.pg-main, .pg-main * { box-sizing: border-box; }
.pg-main { width: calc(100% - 238px); margin-left: 238px; padding: 32px clamp(18px,4vw,60px) 100px; color: #143038; }
.pg-main [hidden] { display: none !important; }
.pg-wrap { max-width: 980px; margin: 0 auto; }
.pg-back { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: transparent; color: #1d5e72; font: inherit; font-weight: 600; margin-bottom: 28px; cursor: pointer; }
.pg-main h1 { font-size: clamp(32px,4vw,52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 0 0 16px; }
.pg-intro { max-width: 660px; color: #52666b; font-size: 17px; line-height: 1.7; margin-bottom: 36px; }
.pg-entry { max-width: 580px; padding: clamp(24px,4vw,40px); border-radius: 16px; background: #fffdf9; border: 1px solid #d5dfdf; }
.pg-symbol { font-size: 40px; color: #1d5e72; margin-bottom: 18px; }
.pg-main h2 { text-align: left !important; font-size: 28px; font-weight: 750; line-height: 1.2; margin: 0 0 24px; overflow-wrap: anywhere; }
.pg-entry label { display: block; font-weight: 700; margin-bottom: 10px; }
.pg-entry input { display: block; width: 100%; border: 1px solid #8a9fa3; border-radius: 8px; background: #fff; color: #143038; padding: 16px; font-size: clamp(14px,1.6vw,18px); font-weight: 600; text-transform: uppercase; caret-color: #1d5e72; }
.pg-entry input::placeholder { color: #5c7075; font-weight: 400; }
.pg-entry form p, .pg-note { font-size: 13px; line-height: 1.7; color: #52666b; margin: 14px 0 22px; max-width: 70ch; }
.pg-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; background: #1d5e72; color: #fff !important; border: 1px solid #1d5e72; border-radius: 8px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none !important; line-height: 1.4; }
.pg-button:hover { background: #15495a; }
.pg-secondary { color: #1d5e72 !important; background: transparent; }
.pg-secondary:hover { background: #e8f0f1; }
.pg-button:disabled { opacity: .65; cursor: wait; }
.pg-button[aria-busy="true"] .material-symbols-outlined { animation: pg-working 1s ease-in-out infinite alternate; }
.pg-main :focus-visible, .pg-login-modal :focus-visible { outline: 3px solid #1d5e72; outline-offset: 4px; }
.pg-main ::selection { background: #1d5e72; color: #fff; }
.pg-error { padding: 18px 22px; background: #fff0eb; color: #85371c; border-radius: 8px; margin-bottom: 28px; max-width: 70ch; line-height: 1.6; }
.pg-gift { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 32px; align-items: start; padding: 32px; background: #fffdf9; border-radius: 16px; border: 1px solid #d5dfdf; }
.pg-cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.pg-type { color: #52666b; font-size: 14px; margin: 0 0 10px; }
.pg-gift h2 { font-size: clamp(26px,3vw,36px); margin-bottom: 12px; }
.pg-artist { color: #52666b; line-height: 1.6; margin: 0 0 24px; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pg-tracks { margin-top: 36px; }
.pg-tracks h3 { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.pg-tracks h3 span { color: #52666b; font-size: 14px; margin-left: 10px; }
.pg-tracks ol { list-style: none; padding: 0; margin: 0; counter-reset: tracks; }
.pg-tracks li { counter-increment: tracks; display: flex; align-items: center; gap: 18px; padding: 16px 8px; border-bottom: 1px solid #d5dfdf; }
.pg-tracks li:before { content: counter(tracks,decimal-leading-zero); color: #52666b; font-variant-numeric: tabular-nums; }
.pg-tracks li > div { flex: 1; min-width: 0; }
.pg-tracks strong { display: block; overflow-wrap: anywhere; font-weight: 600; }
.pg-tracks small { display: block; color: #52666b; margin-top: 4px; }
.pg-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; max-width: 980px; margin-top: 32px; }
.pg-help { color: #1d5e72; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.pg-sound { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 10px; background: transparent; color: #52666b; font: inherit; font-size: 13px; cursor: pointer; }
.pg-sound:hover { background: #e8f0f1; }
.pg-celebration { position: relative; overflow: hidden; min-height: 400px; padding: clamp(32px,5vw,56px) 24px; border-radius: 16px; background: #eaf3ef; color: #143038; text-align: center; }
.pg-celebration > :not(.pg-confetti) { position: relative; z-index: 1; }
.pg-celebration h2 { text-align: center !important; font-size: clamp(28px,3.8vw,40px); max-width: 620px; margin: 22px auto 16px; letter-spacing: -.025em; }
.pg-celebration > p { max-width: 580px; margin: 0 auto 20px; color: #375d50; line-height: 1.75; }
.pg-celebration .pg-success-music { margin-bottom: 28px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pg-medal { width: 100px; height: 100px; margin: 0 auto; }
.pg-medal svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pg-medal-circle { fill: #fffdf9; stroke: #2d7a60; stroke-width: 3; }
.pg-medal-check { fill: none; stroke: #2d7a60; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 64; }
.is-celebrating .pg-medal { animation: pg-medal-pop .65s cubic-bezier(.16,1,.3,1) both; }
.is-celebrating .pg-medal-check { animation: pg-check .55s .15s cubic-bezier(.16,1,.3,1) both; }
.pg-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pg-confetti i { position: absolute; left: var(--x); top: 16%; width: 8px; height: 14px; border-radius: 2px; background: #2d7a60; opacity: 0; }
.pg-confetti i:nth-child(3n) { background: #d66b34; }
.pg-confetti i:nth-child(3n + 1) { background: #1d5e72; }
.is-celebrating .pg-confetti i { animation: pg-confetti-fall 1.15s var(--delay) cubic-bezier(.16,1,.3,1) both; }
.pg-login-modal { width: min(660px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 24px; border: 0; border-radius: 16px; background: #fffdfa; color: #143038; box-shadow: 0 24px 80px rgba(8,28,34,.24); overflow: auto; }
.pg-login-modal::backdrop { background: rgba(8,28,34,.6); }
.pg-modal-heading { display: flex; align-items: flex-start; gap: 16px; }
.pg-modal-heading > div { flex: 1; min-width: 0; }
.pg-modal-heading h2 { text-align: left !important; margin: 0 0 10px; font-size: 22px; font-weight: 750; line-height: 1.3; }
.pg-modal-heading p { font-size: 14px; line-height: 1.6; color: #52666b; margin-bottom: 16px; }
.pg-modal-heading button { flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #e8efef; color: #1d5e72; cursor: pointer; }
.pg-login-modal iframe { display: block; width: 100%; height: 510px; border: 0; background: #fffdfa; }
@keyframes pg-medal-pop { 0% { transform: scale(.65) rotate(-12deg); filter: blur(5px); } 75% { transform: scale(1.06) rotate(2deg); filter: blur(0); } 100% { transform: scale(1) rotate(0); filter: blur(0); } }
@keyframes pg-check { from { stroke-dashoffset: 64; } to { stroke-dashoffset: 0; } }
@keyframes pg-confetti-fall { 0% { opacity: 0; transform: translateY(-30px) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--drift),290px) rotate(var(--turn)); } }
@keyframes pg-working { to { opacity: .35; } }
@media (max-width:1180px) { .pg-main { width: calc(100% - 205px); margin-left: 205px; } .pg-gift { grid-template-columns: 190px minmax(0,1fr); gap: 24px; padding: 24px; } }
@media (max-width:820px) { .pg-main { width: 100%; margin-left: 0; padding-top: 24px; } }
@media (max-width:575px) { .pg-main { padding-inline: 16px; } .pg-back { margin-bottom: 24px; } .pg-gift { grid-template-columns: 1fr; padding: 20px; gap: 24px; } .pg-cover { max-width: 240px; } .pg-actions, .pg-actions .pg-button, .pg-celebration .pg-button { width: 100%; } .pg-intro { font-size: 16px; } .pg-entry input { font-size: 14px; } .pg-entry { padding: 24px 20px; } .pg-login-modal { padding: 18px; } .pg-login-modal iframe { height: 500px; } }
@media (prefers-reduced-motion: reduce) { .pg-celebration *, .pg-button * { animation: none !important; } .pg-confetti { display: none; } }
.pg-login-modal:not([open]) { display: none !important; }

.pg-download-spinner { width: 18px; height: 18px; flex-shrink: 0; border: 2px solid #b9cdd2; border-top-color: #1d5e72; border-radius: 50%; animation: pg-download-spin .8s linear infinite; }
.pg-download-status { margin-top: 20px; padding-top: 16px; border-top: 1px solid #d5dfdf; }
.pg-download-message { margin: 0 0 12px; color: #52666b; font-size: 13px; line-height: 1.65; }
.pg-download-message strong { display: block; margin-bottom: 4px; color: #143038; font-size: 15px; }
.pg-download-message span { display: block; }
.pg-download-progress { display: flex; align-items: center; gap: 12px; }
.pg-download-progress progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 6px; overflow: hidden; background: #d7e3e5; color: #1d5e72; accent-color: #1d5e72; }
.pg-download-progress progress::-webkit-progress-bar { background: #d7e3e5; border-radius: 6px; }
.pg-download-progress progress::-webkit-progress-value { background: #1d5e72; border-radius: 6px; }
.pg-download-progress progress::-moz-progress-bar { background: #1d5e72; border-radius: 6px; }
.pg-download-progress span { flex-shrink: 0; color: #1d5e72; font-size: 12px; font-variant-numeric: tabular-nums; }
@keyframes pg-download-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pg-download-spinner { animation: none !important; } }
