/* Live notification pop-ups (owner 11/3: "make Notifications & Gifts pop up without having to refresh"). app.js liveNotePop().
   Desktop: top-right stack. Phones: under the 54px mobile top bar, full width (nothing at the bottom, so no nav/home bar clash).
   Everything offsets by var(--safe-top) for the installed app's status bar. */
#live-notes { position: fixed; z-index: 1150; top: calc(18px + var(--safe-top, 0px)); right: 20px; width: min(380px, calc(100vw - 32px));
    display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
#live-notes .ln-card { position: relative; pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 4px 12px;
    padding: 13px 12px 14px 13px; border-radius: 14px; overflow: hidden; color: #fff;
    background: linear-gradient(160deg, rgba(30,26,18,.97), rgba(10,10,12,.98)); border: 1px solid rgba(255,181,43,.32);
    box-shadow: 0 18px 46px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,181,43,.08);
    opacity: 0; transform: translateX(24px) scale(.98); transition: opacity .22s ease, transform .32s cubic-bezier(.2,.9,.3,1.2); }
#live-notes .ln-card.in { opacity: 1; transform: none; }
#live-notes .ln-ico { grid-row: 1 / span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,181,43,.14); border: 1px solid rgba(255,181,43,.38); color: #ffb52b; }
#live-notes .ln-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#live-notes .ln-txt { display: grid; gap: 3px; min-width: 0; }
#live-notes .ln-txt strong { font-size: 15px; font-weight: 700; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
#live-notes .ln-txt span { font-size: 13.5px; line-height: 1.4; color: #b9b2a3; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#live-notes .ln-x { width: 26px; height: 26px; padding: 0 !important; border: 0; border-radius: 50%; background: rgba(255,255,255,.06); color: #9a9488;
    font-size: 12px; line-height: 1; cursor: pointer; }
#live-notes .ln-x:hover { background: rgba(255,255,255,.13); color: #fff; }
#live-notes .ln-go { grid-column: 2 / span 2; justify-self: start; margin-top: 6px; height: 32px; padding: 0 16px !important; border-radius: 9px; cursor: pointer;
    border: 1px solid rgba(255,181,43,.5); background: rgba(255,181,43,.1); color: #ffcb63; font-weight: 700; font-size: 13px; letter-spacing: .03em; }
#live-notes .ln-go:hover { background: rgba(255,181,43,.2); color: #fff; }
#live-notes .ln-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #ffb52b; opacity: .8; transform-origin: left; transform: scaleX(1); }
#live-notes .ln-card.in .ln-bar { animation: lnBar 8s linear forwards; }
@keyframes lnBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* gifts: bigger, gold, stays until closed or opened */
#live-notes .ln-card.ln-gift { grid-template-columns: auto 1fr; gap: 6px 14px; padding: 16px 16px 16px 14px; border-color: rgba(255,200,90,.65);
    background: radial-gradient(120% 140% at 0% 0%, rgba(255,181,43,.22), transparent 55%), linear-gradient(160deg, rgba(40,30,12,.98), rgba(12,10,8,.98));
    box-shadow: 0 22px 54px rgba(0,0,0,.65), 0 0 34px rgba(255,181,43,.28), inset 0 1px 0 rgba(255,220,140,.18); }
#live-notes .ln-card.ln-gift::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255,230,160,.16) 45%, transparent 60%); background-size: 250% 100%; animation: lnShine 3.2s ease-in-out infinite; }
@keyframes lnShine { 0% { background-position: 130% 0; } 60%, 100% { background-position: -30% 0; } }
#live-notes .ln-gift .ln-gift-ico { grid-row: 1 / span 2; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; font-size: 34px; line-height: 1;
    background: radial-gradient(circle at 50% 40%, rgba(255,200,90,.35), rgba(255,181,43,.08) 70%); border: 1px solid rgba(255,200,90,.45);
    animation: lnBob 2.6s ease-in-out infinite; }
@keyframes lnBob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-3px) rotate(4deg); } }
#live-notes .ln-gift .ln-txt { padding-right: 22px; }
#live-notes .ln-gift .ln-txt small { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #ffcb63; }
#live-notes .ln-gift .ln-txt strong { font-size: 17px; line-height: 1.2; }
#live-notes .ln-gift .ln-x { position: absolute; top: 8px; right: 8px; z-index: 1; }
#live-notes .ln-go.ln-primary { grid-column: 2; height: 38px; padding: 0 22px !important; border: 0; color: #1a1205; font-size: 14px; text-transform: uppercase; letter-spacing: .06em;
    background: linear-gradient(180deg, #ffd36e, #f0a822); box-shadow: 0 6px 18px rgba(255,181,43,.35), inset 0 1px 0 rgba(255,255,255,.5); }
#live-notes .ln-go.ln-primary:hover { filter: brightness(1.08); color: #1a1205; }

/* bell gives a little ring when something new lands */
.notification-button.ln-ring svg { animation: lnRing .9s ease; transform-origin: 50% 10%; }
@keyframes lnRing { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

@media (max-width: 767px) {
    #live-notes { top: calc(62px + var(--safe-top, 0px)); left: 12px; right: 12px; width: auto; gap: 8px; }
    #live-notes .ln-card { transform: translateY(-14px) scale(.98); }
    #live-notes .ln-card.in { transform: none; }
    #live-notes .ln-gift .ln-gift-ico { width: 50px; height: 50px; font-size: 29px; }
    #live-notes .ln-gift .ln-txt strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    #live-notes .ln-card, #live-notes .ln-gift .ln-gift-ico, #live-notes .ln-card.ln-gift::before, .notification-button.ln-ring svg { animation: none; transition: opacity .2s; }
}

/* owner 11/8 ("Trade accepted" pop-up: warped ✕, looks weird on mobile): pin the ✕ size (a global button min-height stretched it),
   graphite card with a gold accent bar like the site toast, tidier phone layout */
#live-notes .ln-x { width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; max-height: 28px; flex: 0 0 28px;
    display: grid; place-items: center; border-radius: 50% !important; border: 1px solid rgba(255,255,255,.08); }
#live-notes .ln-card:not(.ln-gift) { background: linear-gradient(180deg, rgba(31,33,39,.97), rgba(15,16,20,.98)); border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 46px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05); padding: 13px 12px 14px 16px; align-items: center; }
#live-notes .ln-card:not(.ln-gift)::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: #ffb52b; box-shadow: 0 0 12px #ffb52b; }
#live-notes .ln-card:not(.ln-gift) .ln-ico { width: 30px; height: 30px; }
#live-notes .ln-card:not(.ln-gift) .ln-txt strong { font: 700 16px/1.15 "Barlow Condensed", system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
#live-notes .ln-card:not(.ln-gift) .ln-txt span { color: #a9b0bc; }
#live-notes .ln-bar { height: 2px; background: linear-gradient(90deg, transparent, #ffb52b); }
@media (max-width: 767px) {
    #live-notes .ln-card:not(.ln-gift) { grid-template-columns: 30px 1fr 28px; gap: 4px 10px; padding: 11px 10px 12px 14px; }
    #live-notes .ln-card:not(.ln-gift) .ln-txt strong { font-size: 15px; }
    #live-notes .ln-card:not(.ln-gift) .ln-txt span { font-size: 13px; -webkit-line-clamp: 2; }
    #live-notes .ln-go { height: 30px; font-size: 12.5px; }
}
#live-notes .ln-go { min-height: 0 !important; height: 32px !important; }
#live-notes .ln-go.ln-primary { height: 38px !important; }
