/* Sheets (menus, keypad, inventory), death screen, cutscenes, top-bar money. */

.pills { display: flex; gap: 8px; align-items: center; }
.money-chip {
  background: #d3f9d8;
  color: #2b8a3e;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 16px;
}

.sheet { max-height: calc(var(--app-h) * 0.82); display: flex; flex-direction: column; z-index: 20; }
.scrim { z-index: 19; }
.sheet-body { overflow-y: auto; padding-bottom: 8px; }
#sheetSide:not(.show) { display: none; }
.sheet-intro { margin: 0 4px 14px; color: var(--muted); font-weight: 500; line-height: 1.5; }

.menu-list { display: grid; gap: 8px; }
.menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--tile, var(--seg));
  text-align: left;
  transition: transform 0.15s, background 0.15s;
}
.menu-row:hover:not(:disabled) { transform: translateY(-1px); }
.menu-row:disabled { opacity: 0.45; cursor: default; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.menu-tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 20px;
  background: var(--tile, var(--seg));
  color: #241c2c;
  text-align: center;
}
.menu-tile:disabled { opacity: 0.45; }
.menu-img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; }
.menu-row .menu-img { width: 44px; height: 44px; }
.menu-icon svg { width: 40px; height: 40px; display: block; }
.menu-text { display: grid; gap: 2px; }
.menu-label { font-weight: 800; font-size: 15px; }
.menu-sub { font-weight: 500; font-size: 13px; color: var(--muted); }
.menu-tile .menu-sub { color: #5c5466; }

.keypad-display {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
  padding: 8px 0 14px;
  min-height: 52px;
}
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.key {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--seg);
  font-size: 26px;
  font-weight: 700;
  transition: background 0.12s, transform 0.12s;
}
.key:active { transform: scale(0.94); background: color-mix(in srgb, var(--primary) 20%, var(--seg)); }
.choice-row.center { justify-content: center; }

.item-img { width: 52px; height: 52px; object-fit: contain; }
.item-detail { min-height: 8px; }

.death {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(120, 0, 40, 0.55), rgba(8, 2, 12, 0.92));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 8;
}
.death.show { opacity: 1; pointer-events: auto; }
.death-card {
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.death-card h2 { margin: 0 0 10px; font-size: 30px; font-weight: 800; }
.death-card p { margin: 0 0 22px; line-height: 1.55; font-weight: 500; color: var(--muted); }

.cutscene {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
  overflow: hidden;
}
.cutscene img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.cutscene.show { opacity: 1; }
.cutscene.show img { animation: kenburns 14s ease-out forwards; }
@keyframes kenburns { to { transform: scale(1.12) translateY(-1.5%); } }

.title-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
#continueBtn { background: #fff; color: #c2185b; }

/* ------------------------------------------------------------ Larry's phone */
#sheetTitle:empty { display: none; }
.sheet-head:has(#sheetTitle:empty) { margin-bottom: 4px; }
.phone-host { display: grid; place-items: center; padding-bottom: 4px; }
.phone {
  position: relative;
  width: min(340px, 100%);
  height: min(640px, calc(var(--app-h) * 0.7));
  border-radius: 44px;
  background: #0f0d14;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(10, 0, 30, 0.35), inset 0 0 0 2px #2b2833;
  display: flex;
  flex-direction: column;
}
.phone::after {
  /* the famous crack */
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 34px;
  pointer-events: none;
  background:
    linear-gradient(62deg, transparent 49.6%, rgba(255,255,255,0.35) 50%, transparent 50.4%) 0 0 / 60% 40% no-repeat,
    linear-gradient(-28deg, transparent 49.7%, rgba(255,255,255,0.25) 50%, transparent 50.3%) 0 0 / 70% 55% no-repeat;
}
.phone-status { display: flex; justify-content: space-between; align-items: center; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 16px 6px; }
.phone-notch { width: 80px; height: 20px; border-radius: 12px; background: #000; }
.phone-screen {
  flex: 1;
  border-radius: 30px;
  overflow: hidden auto;
  background: radial-gradient(120% 80% at 20% 0%, #ff2d87 0%, #6741d9 45%, #1c1033 100%);
  color: #fff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phone-home { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; width: 110px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.75); z-index: 2; }
.phone-wallpaper-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 4px 6px; }
.phone-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
.phone-app { display: grid; justify-items: center; gap: 6px; color: #fff; font-size: 11px; font-weight: 700; }
.phone-app img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35)); }
.phone-widget { margin-top: auto; background: rgba(255,255,255,0.16); backdrop-filter: blur(10px); border-radius: 22px; padding: 14px 16px; display: flex; justify-content: space-between; font-size: 15px; }
.phone-widget span { font-size: 24px; font-weight: 800; }

.phone-screen.app-ryde { background: #12101c; padding: 0; gap: 0; }
.ryde-map { position: relative; flex: 1 1 0; min-height: 96px; overflow: hidden; }
/* blurred copy behind the map for when it is scaled down to keep every pin in view */
.ryde-map::before { content: ''; position: absolute; inset: -24px; background: url('../assets/ui/ryde-map.webp') center 30% / cover; filter: blur(12px) brightness(0.55); }
.ryde-world { position: absolute; left: 50%; top: 0; width: 100%; aspect-ratio: 720 / 1273; transform: translate(-50%, -9%); }
.ryde-world img { width: 100%; height: 100%; display: block; }
.ryde-pin { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #ff2d87; box-shadow: 0 0 0 5px rgba(255,45,135,0.35); }
.ryde-pin.here { background: #4dabf7; box-shadow: 0 0 0 6px rgba(77,171,247,0.4); animation: ping 1.4s infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 12px rgba(77,171,247,0.1); } }
.ryde-sheet { flex: none; max-height: 85%; background: #fff; color: #16131c; border-radius: 24px 24px 0 0; margin-top: -18px; position: relative; padding: 14px 12px 28px; display: grid; gap: 6px; align-content: start; overflow-y: auto; }
.ryde-title { font-weight: 800; font-size: 17px; padding: 0 4px 2px; }
.ryde-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 10px; border-radius: 14px; background: #f2f2f7; line-height: 1.2; }
.ryde-row:disabled { opacity: 0.45; }
.ryde-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff2d87; flex: none; }
.ryde-name { display: grid; flex: 1; font-size: 14px; min-width: 0; }
.ryde-row .ryde-name small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ryde-name small, .ryde-driver small, .ryde-pay small { color: #6e6a78; font-weight: 500; font-size: 12px; }
.ryde-price { font-weight: 800; font-size: 13px; }
.ryde-driver, .ryde-pay { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #f2f2f7; }
.ryde-driver > span:nth-child(2), .ryde-pay small { flex: 1; }
.ryde-driver > span:nth-child(2) { display: grid; }
.ryde-pay { flex-wrap: wrap; }
.ryde-pay b { width: 100%; }
.ryde-pay span { font-weight: 800; }
.ryde-avatar { width: 40px; height: 40px; border-radius: 50%; background: #ffd43b; display: grid; place-items: center; font-weight: 800; }
.ryde-eta { font-weight: 800; color: #2b8a3e; }
.ryde-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

.phone-screen.app-laffpay { background: linear-gradient(180deg, #2b8a3e, #0b3d1d); }
.pay-balance { display: grid; gap: 2px; padding: 10px 6px; }
.pay-balance b { font-size: 46px; font-weight: 800; letter-spacing: -0.02em; }
.pay-list { background: rgba(255,255,255,0.12); border-radius: 20px; padding: 6px 12px; }
.pay-row { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.pay-row:last-child { border-bottom: 0; }
.choice.wide { width: 100%; }

.phone-screen.app-flirtr { background: linear-gradient(180deg, #fff0f6, #ffdeeb); color: #16131c; }
.flirtr-logo { font-size: 26px; font-weight: 800; color: #ff2d87; text-align: center; letter-spacing: -0.03em; }
.flirtr-card { border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(194, 24, 91, 0.2); }
.flirtr-card img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; display: block; background: #ffe3ec; }
.flirtr-info { display: grid; gap: 4px; padding: 12px 14px 14px; font-size: 13px; }
.flirtr-info b { font-size: 18px; }
.flirtr-actions { display: flex; justify-content: center; gap: 28px; }
.flirtr-btn { width: 56px; height: 56px; border-radius: 50%; font-size: 24px; font-weight: 800; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.flirtr-btn.no { color: #868e96; }
.flirtr-btn.yes { color: #ff2d87; }
.flirtr-result { font-size: 13px; font-weight: 600; line-height: 1.45; text-align: center; min-height: 36px; padding: 0 6px 24px; }

.phone-screen.app-larrygram { background: #fff; color: #16131c; }
.gram-head { display: flex; gap: 12px; align-items: center; }
.gram-head > span:last-child { display: grid; }
.gram-head small, .gram-post small { color: #6e6a78; font-weight: 500; }
.gram-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #ff922b, #ae3ec9); padding: 3px; }
.gram-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top; background: #fff; }
.gram-post { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: #f8f9fa; font-size: 14px; }

.phone-screen.app-camera { background: #000; align-items: center; }
.camera-view { width: 100%; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: #222; position: relative; }
.camera-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.camera-view.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: flash 0.5s forwards; }
@keyframes flash { to { opacity: 0; } }
.camera-shutter { width: 64px; height: 64px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,0.35); flex: none; }
.app-camera .flirtr-result { color: #fff; }
.sheet:has(.phone-host) { background: transparent; box-shadow: none; }
.sheet:has(.phone-host) .grabber, .sheet:has(.phone-host) .sheet-head { display: none; }
