/* The toy in this note. Loaded on this page only, after styles.css and notes.css.
   Same rules as everywhere: only opacity and transform move, and anything marked
   .lp loops only while the toy is on screen. */

/* the phone: waiting means a hot phone draining every day; buying now ends it */
.ph { --tint: #E5866A }
.ph-stage { display: grid; place-items: center; padding: 8px 0 4px }
.ph-phone { position: relative; width: 132px; aspect-ratio: 9 / 18; border-radius: 26px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 18px 40px -22px rgba(0, 0, 0, .5); display: grid; place-content: center; justify-items: center; gap: 16px }
.ph-notch { position: absolute; top: 10px; left: 50%; width: 36px; height: 9px; margin-left: -18px; border-radius: 9px; background: var(--line-2) }
.ph-heat { position: absolute; inset: -35%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(229, 134, 106, .6), transparent); animation: ph-heat 2.4s ease-in-out infinite; transition: opacity .5s }
@keyframes ph-heat { 50% { opacity: .35; transform: scale(.9) } }
.ph-batt { position: relative; width: 64px; height: 26px; padding: 3px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--muted) }
.ph-batt::after { content: ""; position: absolute; right: -5px; top: 8px; width: 3px; height: 10px; border-radius: 0 2px 2px 0; background: var(--muted) }
.ph-batt i { display: block; height: 100%; border-radius: 4px; background: #E5866A; transform-origin: left; animation: ph-drain 2.6s ease-in infinite }
@keyframes ph-drain { 0% { transform: scaleX(1) } 85% { transform: scaleX(.08); opacity: 1 } 92% { transform: scaleX(.08); opacity: 0 } 100% { transform: scaleX(1); opacity: 0 } }
.ph-when { display: grid; height: 1.4em }
.ph-when > span { grid-area: 1 / 1; text-align: center; opacity: 0 }
.ph-m { animation: ph-month 10s linear infinite; animation-delay: calc(var(--k) * 2s) }
@keyframes ph-month { 0% { opacity: 0; transform: translateY(6px) } 3%, 17% { opacity: 1; transform: none } 20%, 100% { opacity: 0; transform: translateY(-6px) } }
.ph-today { color: var(--ink-accent); transition: opacity .4s }
.ph[data-choice="now"] .ph-heat { animation: none; opacity: 0 }
.ph[data-choice="now"] .ph-m { animation: none; opacity: 0 }
.ph[data-choice="now"] .ph-batt i { animation: none; transform: none; opacity: 1; background: var(--a2) }
.ph[data-choice="now"] .ph-today { opacity: 1 }
.ph-btns { display: flex; gap: 8px }
.toy-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--fg); color: var(--fg) }
.toy-btn[aria-pressed="false"] { color: var(--muted) }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion="off"]) .ph-static { display: none } }
.ph[data-choice="now"] .ph-static { opacity: 0 }
.ph[data-choice="wait"] .ph-static { opacity: 1 }
