/* Photos of your daily card (alex 2026-11-18): the camera inside a big card, Your photos, one photo full screen. */

/* ---------- Home: the photos button, the camera on the card, "Add a photo", the photo on the back ---------- */
.home-card .foot-right { display: flex; align-items: center; gap: 6px; }
.home-card .card-cam { position: relative; width: 24px; height: 24px; border-radius: 12px; background: rgba(239, 237, 233, .14); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden; }
.home-card .card-cam::after { content: ""; position: absolute; inset: -6px -3px; }
.home-card .card-cam img { width: 100%; height: 100%; object-fit: cover; }
.home-card .back.ph-back { background: #17181b; }
.home-card .back.ph-back::after { display: none; }
.home-card .back.ph-back > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-card .back.ph-back > img.develop { animation: develop 2.4s ease-out 1.6s both; }
@keyframes develop { from { filter: sepia(.8) brightness(.35) blur(3px) contrast(.8); } 60% { filter: sepia(.3) brightness(.85) blur(.5px); } to { filter: none; } }
.home-card .ph-words { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px; gap: 3px; background: linear-gradient(180deg, transparent, rgba(8, 9, 10, .72)); }
.home-card .ph-words .ph-tag { font-size: calc(11px / (var(--k, 1) * 1.376)); gap: 4px; }
.home-card .ph-words .ph-tag i { width: 5px; height: 5px; }
.home-card .ph-words .ph-task { font-size: calc(15px / (var(--k, 1) * 1.376)); }
.add-photo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 22px; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 500; animation: undo-in .6s ease both; }
.add-photo:active { background: rgba(239, 237, 233, .18); }
.undo-slot:has(.add-photo) { flex-direction: column; align-items: center; gap: 0; }

/* The card's words as a layer over a photo (never part of the picture) */
.ph-words { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 48px 20px 20px; text-align: left; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 10, .7)); pointer-events: none; transition: opacity .25s ease; }
.ph-words.off { opacity: 0; }
.ph-tag { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.ph-tag i { width: 8px; height: 8px; border-radius: 50%; display: block; flex-shrink: 0; }
.ph-task { font-size: 20px; font-weight: 600; line-height: 1.25; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }

/* ---------- The camera, inside a big card ---------- */
.cam { position: fixed; inset: 0; z-index: 40; background: radial-gradient(120% 60% at 50% 40%, #24262b, #08090a 70%); display: flex; flex-direction: column;
  padding: var(--top) var(--edge) var(--bot); opacity: 0; transition: opacity .28s ease; }
.cam.in { opacity: 1; }
.cam-top { display: flex; justify-content: space-between; align-items: center; }
.cam-mid { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.cam-card { position: relative; width: min(390px, 100%); max-height: 100%; aspect-ratio: 5 / 7; border-radius: 16px; overflow: hidden; background: #141518;
  box-shadow: 0 0 0 1px rgb(227 196 134 / .35), 0 0 40px rgb(242 192 143 / .18), 0 20px 50px rgba(0, 0, 0, .5); }
.cam-card video, .cam-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-card video.mirror { transform: scaleX(-1); }
.cam-card [hidden] { display: none; }
.cam-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; }
.cam-msg .btn-soft { margin-top: 16px; padding: 0 24px; }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 8px 8px; }
.cam-bar[hidden], .cam-after[hidden] { display: none; }
.cam-lib { justify-self: start; }
.cam-gap { width: 44px; }
.cam-shutter { width: 76px; height: 76px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px var(--sky2), 0 0 0 6px rgb(242 192 143 / .5), 0 0 30px rgb(242 192 143 / .35); }
.cam-shutter:active { transform: scale(.94); }
.cam-shutter:disabled { opacity: .35; }
.cam-after { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.cam-txt[aria-pressed="true"] { color: var(--gold); }
.ph-glass { background: rgba(20, 21, 24, .5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }

/* ---------- Your photos: a page that slides in from the right, like Settings ---------- */
#photos { position: fixed; inset: 0; z-index: 6; background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 30%, var(--sky3) 100%);
  transform: translateX(100%); transition: transform .42s var(--ease); box-shadow: -12px 0 32px rgba(0, 0, 0, .35); }
.in-photos #photos { transform: none; }
.in-photos #home { transform: translateX(-24%); opacity: .4; pointer-events: none; }
.in-photos #sun { opacity: .3; }
.ph-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.ph-page { max-width: 520px; margin: 0 auto; padding: var(--top) var(--edge) calc(var(--bot) + 24px); display: flex; flex-direction: column; gap: 24px; }
.ph-sec { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 16px; }
.ph-h { font-size: 20px; font-weight: 600; margin: 0; }
.ph-grid { display: grid; gap: 4px; }
.ph-grid.wk { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-grid.mo { grid-template-columns: repeat(5, 1fr); gap: 3px; }
.ph-grid.yr { grid-template-columns: repeat(10, 1fr); gap: 2px; }
.ph-tile { display: flex; flex-direction: column; gap: 4px; padding: 0; text-align: left; min-width: 0; }
.ph-frame { display: block; position: relative; width: 100%; aspect-ratio: 5 / 7; border-radius: 12px; overflow: hidden; background: var(--fill2); }
.ph-grid.mo .ph-frame { aspect-ratio: 1; border-radius: 4px; }
.ph-grid.yr .ph-frame { aspect-ratio: 1; border-radius: 2px; }
.ph-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-day { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.ph-day i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.ph-year { display: flex; flex-direction: column; gap: 16px; }
.ph-y { font-size: 22px; font-weight: 700; margin: 0; }
.ph-ymonth { display: flex; flex-direction: column; gap: 4px; }
.ph-mlabel { align-self: flex-start; min-height: 32px; font-size: 15px; font-weight: 600; color: var(--ink2); padding: 0; }
.ph-empty { padding: 40px 0; display: flex; flex-direction: column; gap: 8px; text-align: center; color: var(--ink2); }
.ph-empty .sub { font-size: 15px; color: var(--dim); }

/* ---------- One photo, full screen: the photo first, the day slides up from the bar ---------- */
.ph-viewer { position: fixed; inset: 0; z-index: 30; background: #000; opacity: 0; transition: opacity .3s ease; touch-action: none; }
.ph-viewer.in { opacity: 1; }
.ph-pic { position: absolute; inset: 0; }
.ph-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-top { position: absolute; left: var(--edge); right: var(--edge); top: var(--top); display: flex; justify-content: space-between; }
.ph-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px var(--edge) var(--bot); border-radius: 26px 26px 0 0; background: #1f2024; box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); display: flex; flex-direction: column; max-height: 72%; transition: max-height .4s var(--ease); }
.ph-bar .grabber { align-self: center; width: 36px; height: 5px; border-radius: 3px; background: rgba(239, 237, 233, .3); margin-bottom: 8px; }
.ph-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 0 8px; text-align: left; min-height: 44px; }
.ph-mood { font-size: 22px; font-weight: 600; }
.ph-date { font-size: 15px; color: var(--dim); }
.ph-more { display: none; flex-direction: column; gap: 16px; overflow-y: auto; padding-bottom: 8px; }
.ph-viewer.open .ph-more { display: flex; }
.ph-line { height: 1px; background: rgba(239, 237, 233, .1); }
.ph-row { display: flex; gap: 12px; align-items: flex-start; }
.ph-row.cd { flex-direction: column; gap: 4px; }
.ph-row.cd .ph-val { font-size: 17px; font-weight: 600; }
.ph-ico { flex: 0 0 32px; height: 32px; border-radius: 16px; background: var(--fill); display: flex; align-items: center; justify-content: center; color: var(--ink2); }
.ph-lab { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.ph-lab i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.ph-val { font-size: 17px; color: var(--ink); }
.ph-whybtn { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 15px; color: var(--ink2); padding: 0; text-align: left; }
.ph-why { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink2); }

/* Your days: the day's photo, small */
.day-photo { width: 96px; aspect-ratio: 5 / 7; border-radius: 12px; overflow: hidden; padding: 0; background: var(--fill2); }
.day-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Weekly wrapped: the photo on the best day and the cards that worked; a second switch on the shared card */
.hphoto { height: 170px; margin: -24px -24px 20px; overflow: hidden; flex-shrink: 0; }
.hphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wr-fan .dc .fc.ph { padding-top: 0; }
.wr-fan .dc .fph { display: block; height: 42%; margin: 0 -14px 2px; overflow: hidden; flex-shrink: 0; }
.wr-fan .dc.one .fph { margin: 0 -18px 4px; }
.wr-fan .dc .fph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wr-pic6box.two { left: 80px; width: 270px; height: 480px; }
.wr-sw.two { top: 596px; }
.wr-sw.wr-sw2 { top: 644px; }

@media (prefers-reduced-motion: reduce) {
  .home-card .back.ph-back > img.develop { animation: none; }
  .in-photos #home { transform: none !important; }
}
.ph-more { touch-action: pan-y; }
.wr-fan .dc .fc.ph .tk { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wr-fan .dc.one .fc.ph .tk { font-size: 20px; }
