/* iPhone capture mini-device — a real screen layout, not a div soup mock. */

.iphone {
  --iphone-w: 260px;
  --iphone-h: 540px;
  --iphone-photo-ratio: 1 / 1.08;
  --iphone-photo-position: 10% 50%;
  width: var(--iphone-w);
  height: var(--iphone-h);
  position: relative;
}

.iphone-bezel {
  position: absolute;
  inset: 0;
  background: #0c1410;
  border-radius: 44px;
  padding: 11px;
  box-shadow:
    var(--shadow-phone),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--paper);
  border-radius: 33px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--grotesk);
  color: var(--ink);
}

.iphone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 24px;
  background: #0c1410;
  border-radius: 14px;
  z-index: 3;
  pointer-events: none;
}

/* Side buttons (subtle, just to read as a real device) */
.iphone-btn-mute, .iphone-btn-volup, .iphone-btn-voldn, .iphone-btn-power {
  position: absolute;
  background: #0a110d;
  border-radius: 2px;
}
.iphone-btn-mute { left: -2px; top: 90px;  width: 3px;  height: 22px; }
.iphone-btn-volup{ left: -2px; top: 122px; width: 3px;  height: 44px; }
.iphone-btn-voldn{ left: -2px; top: 172px; width: 3px;  height: 44px; }
.iphone-btn-power{ right:-2px; top: 130px; width: 3px;  height: 60px; }

/* Status bar */
.iphone-status {
  height: 44px;
  padding: 14px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.iphone-status-right {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink);
}

/* App header */
.iphone-app-header {
  padding: 18px 22px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.iphone-app-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.012em;
}
.iphone-app-meta {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hint);
  font-weight: 500;
  white-space: nowrap;
}

/* Photo */
.iphone-photo {
  position: relative;
  margin: 4px 14px 0;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: var(--iphone-photo-ratio);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--hairline);
}
.iphone-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--iphone-photo-position);
  display: block;
}
.iphone-photo-ph {
  width: 100%; height: 100%;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(21, 32, 26, 0.08) 0,
    rgba(21, 32, 26, 0.08) 1px,
    transparent 1px,
    transparent 8px
  ), var(--surface);
}
.iphone-photo-pill {
  position: absolute;
  left: 10px;
  top: 10px;
}

/* Meta */
.iphone-meta {
  padding: 10px 18px 0;
}
.iphone-meal {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 8px;
  text-wrap: balance;
}
.iphone-kcal {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}
.iphone-kcal-v {
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.iphone-kcal-pm {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.iphone-kcal-u {
  font-family: var(--grotesk);
  font-size: 11px;
  color: var(--hint);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 1px;
}
.iphone-macros {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.iphone-macros-tag {
  font-family: var(--grotesk);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hint);
  font-weight: 600;
  white-space: nowrap;
}
.iphone-macros-vals {
  font-family: var(--serif);
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* CTA stack */
.iphone-cta {
  margin-top: auto;
  padding: 10px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iphone-btn-primary {
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: #F4F7F4;
  border: none;
  font-size: 14.5px;
  font-weight: 500;
  font-family: var(--grotesk);
}
.iphone-btn-ghost {
  height: 38px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--grotesk);
}
.iphone-fine {
  margin: 2px 4px 0;
  font-size: 11.5px;
  text-align: center;
  color: var(--hint);
  line-height: 1.35;
}

/* Saved-record mode: the same object as the standalone record card, translated
   into a believable iPhone screen instead of floating beside the device. */
.iphone-record-mode {
  --iphone-photo-ratio: 1 / 0.88;
  --iphone-photo-position: 12% 50%;
}
.iphone-record-head {
  padding: 18px 20px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.iphone-record-title {
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  line-height: 1;
  color: var(--ink);
}
.iphone-record-date {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hint);
  font-weight: 650;
  white-space: nowrap;
}
.iphone-record-photo {
  margin-top: 5px;
}
.iphone-record-body {
  min-height: 0;
  flex: 1;
  padding: 10px 17px 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.iphone-record-meal {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 520;
  line-height: 1.16;
  color: var(--ink);
  letter-spacing: -0.004em;
  text-wrap: balance;
}
.iphone-record-kcal {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}
.iphone-record-kcal .iphone-kcal-v {
  font-size: 30px;
}
.iphone-record-macro-panel {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: rgba(248, 250, 247, 0.78);
}
.iphone-record-macro-panel .iphone-macros-vals {
  color: var(--ink);
  font-size: 13px;
}
.iphone-record-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.iphone-record-facts > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
}
.iphone-record-fact-k {
  font-size: 9.5px;
  font-weight: 750;
  color: var(--hint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.iphone-record-fact-note {
  color: var(--muted);
  font-size: 10.2px;
  line-height: 1.25;
}
.iphone-backup-line {
  margin-top: auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--r-pill);
  color: var(--teal-deep);
  background: var(--teal-tint);
  font-size: 11.5px;
  font-weight: 700;
}
.iphone-backup-line .seal {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .iphone-record-mode {
    --iphone-photo-ratio: 1 / 0.78;
  }
  .iphone-record-head {
    padding: 14px 18px 7px;
  }
  .iphone-record-title {
    font-size: 19px;
  }
  .iphone-record-date {
    font-size: 9.8px;
  }
  .iphone-record-body {
    padding: 9px 15px 13px;
    gap: 7px;
  }
  .iphone-record-meal {
    font-size: 16px;
  }
  .iphone-record-kcal .iphone-kcal-v {
    font-size: 27px;
  }
  .iphone-record-macro-panel {
    padding: 8px 9px;
  }
  .iphone-record-fact-note {
    display: none;
  }
}
