/* Auto-buy switches, Love Letters, phone inbox and gossip ticker (src/extras.js). */

/* ---------- gossip ticker (top bar, between the logo and the buttons) ---------- */
.ticker { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0 14px; height: 30px;
  background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px; padding: 0 4px 0 4px; overflow: hidden; }
.ticker-tag { flex: none; font-size: 0.7rem; font-weight: 900; letter-spacing: 1px; color: #fff; background: var(--pink); border-radius: 999px; padding: 3px 9px; }
.ticker-track { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-text { position: absolute; top: 50%; left: 0; white-space: nowrap; transform: translate(100%, -50%); color: #fff; font-weight: 700; font-size: 0.92rem; text-shadow: 0 1px 2px rgba(60, 20, 90, 0.35); }
.ticker-text.run { animation: tickerScroll 13s linear forwards; }
@keyframes tickerScroll { 0% { left: 100%; transform: translate(0, -50%); } 100% { left: 0; transform: translate(-100%, -50%); } }
html.reduce-motion .ticker-text.run { animation: tickerFade 13s ease forwards; left: 8px; transform: translate(0, -50%); }
@keyframes tickerFade { 0% { opacity: 0; } 6% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 1150px) { .ticker { display: none; } }
html.compact .ticker { height: 26px; margin: 0 8px; }

/* ---------- auto-buy switches (Fans / Charms panel) ---------- */
.auto-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.auto-chip { flex: 1 1 auto; border: 2px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 0.8rem; font-weight: 800; }
.auto-chip.on { background: linear-gradient(180deg, #7be3a6, #3fbf7a); border-color: #fff; color: #fff; box-shadow: 0 2px 8px rgba(63, 191, 122, 0.35); }
.auto-chip:hover, .auto-chip:focus-visible { filter: brightness(1.05); }

/* ---------- Love Letters (Heroines panel) ---------- */
.letter-box { margin: 8px 0; padding: 8px 10px; border-radius: 14px; background: linear-gradient(180deg, #fff5fa, #ffe8f3); border: 2px solid #ffd0e6; }
.lb-head { font-size: 0.9rem; margin-bottom: 6px; }
.lb-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.small { padding: 5px 10px; font-size: 0.82rem; }
.letter-view h3 { color: var(--hc); margin: 2px 0 10px; }
.letter-view .kicker { font-size: 0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--pink); }
.letter-paper { position: relative; background: #fffdf6; border: 1px solid #f1dfc0; border-radius: 10px; padding: 14px 16px; font-style: italic; line-height: 1.5;
  box-shadow: 0 4px 14px rgba(160, 110, 60, 0.12); background-image: repeating-linear-gradient(transparent 0 25px, rgba(200, 160, 120, 0.18) 25px 26px); }

/* ---------- phone ---------- */
.phone-ui h2 { margin-bottom: 10px; }
.phone-wrap { display: grid; grid-template-columns: 170px 1fr; gap: 10px; height: min(62vh, 560px); }
.phone-contacts { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; }
.pc { display: flex; align-items: center; gap: 8px; border: 0; background: #fff; border-radius: 12px; padding: 6px 8px; text-align: left; position: relative; }
.pc.active { background: linear-gradient(90deg, #ffe0ef, #fff); box-shadow: inset 3px 0 0 var(--pink); }
.pc .avatar { width: 32px; height: 32px; flex: none; }
.pc-name { font-weight: 800; font-size: 0.9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-dot { position: absolute; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px #fff; }
.phone-thread { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: linear-gradient(180deg, #fdf7ff, #f3ecff); border: 2px solid #fff; box-shadow: inset 0 0 0 1px var(--line); }
.pt-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--hc); }
.pt-head .avatar { width: 30px; height: 30px; }
.pt-body { flex: 1; overflow-y: auto; padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pt-time { align-self: center; font-size: 0.72rem; color: var(--muted); margin: 8px 0 2px; }
.bub { max-width: 78%; padding: 7px 11px; border-radius: 16px; line-height: 1.35; font-size: 0.92rem; overflow-wrap: anywhere; }
.bub.her { align-self: flex-start; background: #fff; border: 1px solid color-mix(in srgb, var(--hc) 30%, #fff); border-bottom-left-radius: 5px; }
.bub.you { align-self: flex-end; background: linear-gradient(180deg, var(--pink), var(--pink-d)); color: #fff; border-bottom-right-radius: 5px; }
.bub.photo { font-style: italic; color: var(--muted); background: repeating-linear-gradient(45deg, #fff, #fff 8px, #fdf1f8 8px, #fdf1f8 16px); }
.toast.phone { pointer-events: auto; cursor: pointer; border-left: 4px solid var(--pink); }
.toast.letter { border-left: 4px solid #ff9fca; }
@media (max-width: 760px) { .phone-wrap { grid-template-columns: 1fr; height: auto; } .phone-contacts { flex-direction: row; overflow-x: auto; } .pt-body { max-height: 50vh; } }

/* reply options under a text, and her typing dots */
.pt-choices { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; margin-top: 4px; max-width: 82%; }
.pt-choice { border: 2px solid var(--pink); background: #fff; color: var(--pink-d); border-radius: 16px 16px 5px 16px; padding: 6px 12px; font-weight: 700; font-size: 0.88rem; text-align: right; }
.pt-choice:hover, .pt-choice:focus-visible { background: var(--pink); color: #fff; }
.bub.typing { display: flex; gap: 4px; padding: 10px 12px; }
.bub.typing i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--hc) 60%, #bbb); animation: typingDot 1s infinite ease-in-out; }
.bub.typing i:nth-child(2) { animation-delay: 0.15s; }
.bub.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.pt-more { align-self: center; margin-top: 6px; font-size: 0.78rem; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 3px 10px; }

/* photos she sends in a text, and the tap-to-enlarge view */
.bub.pic { padding: 4px; background: #fff; }
.pt-pic { display: block; border: 0; padding: 0; background: none; border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.pt-pic img { display: block; width: 190px; max-width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.phone-ui { position: relative; }
.pt-lightbox { position: absolute; inset: -8px; z-index: 5; display: grid; place-items: center; border: 0; border-radius: 20px; background: rgba(30, 12, 44, 0.86); cursor: zoom-out; padding: 14px; }
.pt-lightbox img { max-width: 100%; max-height: min(78vh, 720px); border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
