/* Front-facing device body with beveled metal edges and side buttons. */
.phone-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 14px 10px 20px;
  isolation: isolate;
}
.phone-ground-shadow {
  position: absolute;
  left: 6%;
  right: 2%;
  bottom: 3px;
  height: 32px;
  border-radius: 50%;
  background: #5b493841;
  filter: blur(15px);
  transform: translateY(17px);
  pointer-events: none;
}
.phone {
  padding: 9px;
  border: 1px solid #b5b7ad;
  background: linear-gradient(128deg, #e0e1d6, #8e9388 14%, #323633 31%, #202423 67%, #92988d);
  transform: none;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px #f4f3e375, 0 13px 26px #4e412b26;
}
.phone:target, .phone:focus-visible {
  box-shadow: inset 0 0 0 1px #f4f3e375, 0 13px 26px #4e412b26, 0 0 0 4px #aa4d3525;
}
.phone::after {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 43px;
  background: linear-gradient(135deg, #ffffff0c, transparent 23%, transparent 80%, #ffffff05);
  z-index: 4;
  pointer-events: none;
}
.phone-depth {
  position: absolute;
  inset: -2px -2px -4px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(110deg, #d8ddd0, #75806b 18%, #343c2d 55%, #b3bda7);
  border: 1px solid #8a967e;
  box-shadow: 0 2px 0 #394330, 0 0 0 1px #c3ccb566;
  pointer-events: none;
}
.phone-edge {
  position: absolute;
  top: 50px;
  bottom: 50px;
  right: -2px;
  width: 3px;
  z-index: 2;
  border-radius: 2px;
  background: linear-gradient(90deg, #d7ddca, #596749);
  pointer-events: none;
}
.phone-hardware {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.phone-hardware span {
  position: absolute;
  display: block;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, #343b2d, #ccd1c1, #757f69);
  border: .5px solid #758168;
  box-shadow: 0 1px 1px #202c1775;
}
.hardware-action { left: -4px; top: 107px; height: 27px; }
.hardware-volume { left: -4px; height: 49px; }
.volume-up { top: 164px; }
.volume-down { top: 222px; }
.hardware-power { right: -5px; top: 188px; height: 76px; width: 5px!important; }
.phone-hardware .hardware-antenna {
  right: -2px;
  width: 3px;
  height: 5px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #d0d6c4;
}
.antenna-top { top: 57px; }
.antenna-bottom { bottom: 57px; }
.phone-screen {
  position: relative;
  transform: none;
  line-height: 1.3;
  z-index: 1;
  box-shadow: 0 0 0 2px #121712, 0 0 0 3px #30382c;
}
.dynamic-island::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #252e38;
  background: radial-gradient(circle at 35% 30%, #627286, #182131 35%, #0c0e14 70%);
}
.recipe-photo {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0;
  margin: 10px 0 4px;
  background: transparent;
  border-radius: 14px;
}
.recipe-photo img {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 14px;
}
.recipe-photo strong { flex: 1; text-align: left; font-size: 15px; font-weight: 600; color: #222; }
.recipe-photo .icon { width: 17px; height: 17px; color: #8c8a84; }
.recipe-photo:hover .icon { color: var(--blue); }
/* Dialogs stay in the demo screen rather than the browser top layer. */
.phone-dialog {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #222;
  box-shadow: none;
  overflow: hidden;
  z-index: 8;
}
.phone-dialog[open] { display: flex; flex-direction: column; justify-content: flex-end; }
.phone-dialog-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #171c254d;
  border-radius: inherit;
  cursor: default;
}
.phone-dialog-panel {
  position: relative;
  width: 100%;
  max-height: calc(100% - 43px);
  background: var(--app);
  border-radius: 24px 24px 0 0;
  padding: 16px 16px 24px;
  box-shadow: 0 -8px 24px #101d2426;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.phone-dialog .dialog-header { margin-bottom: 12px; }
.phone-dialog .dialog-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.phone-dialog .dialog-header .icon-button { color: var(--blue); background: #334f9c08; width: 32px; min-height: 32px; }
.phone-dialog .dialog-header .icon { width: 17px; height: 17px; }
.phone-dialog .dialog-row { border-color: #dddeda; }
.phone-dialog .dialog-row > button:first-child { font-size: 13px; }
.phone-dialog .dialog-note { font-size: 10px; line-height: 1.6; }
.recipe-photo-dialog[open] { justify-content: flex-start; padding-top: 43px; }
.recipe-photo-dialog .phone-dialog-panel { display: flex; flex-direction: column; height: 100%; max-height: none; overflow: hidden; }
.phone-photo-content { display: grid; place-items: center; min-height: 0; flex: 1; overflow: hidden; }
.recipe-photo-full { width: 100%; height: auto; max-height: 100%; object-fit: contain; border-radius: 14px; }
.phone-screen > .home-indicator { position: relative; z-index: 9; pointer-events: none; }
@media (max-width: 720px) {
  .phone-stage { padding: 10px 9px 18px; }
}
@media (max-width: 390px) {
  .phone-stage { padding-left: 5px; padding-right: 5px; }
  .phone { padding: 7px; }
  .phone::after { inset: 7px; border-radius: 37px; }
  .recipe-photo { margin-top: 8px; }
}
