/* Final readability, contrast and artwork-visibility refinements across themes. */
:root,[data-theme="default"]{--muted:#9aa2b4}
[data-theme="black"]{--muted:#a1a1aa}
[data-theme="white"]{--muted:#475569;--line:#cbd5e1;color-scheme:light}
body{font-weight:500;font-optical-sizing:auto;font-kerning:normal;-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;text-rendering:optimizeLegibility}
p,.form-note,small{font-synthesis:none}
.page-heading p,.section-title p,.panel>p,.panel .form-note,.auth-panel>p,.empty-catalog p,.help-card p,.faq-section details p,.faq-intro p,.footer,.stat-caption,.feature small,.category-card small,.product-body>small{color:var(--muted)}
.field>label,label{color:var(--muted)}
:focus-visible{outline:2px solid var(--purple)!important;outline-offset:3px}

/* Brand marks that are white or pastel by design get an accessible dark variant
   only on the light product-art surface. Other brand colors remain untouched. */
[data-theme="white"] .product-art .brand-svg[data-contrast="light"]{color:#1e293b!important;fill:#1e293b!important;filter:drop-shadow(0 1px 1px rgba(15,23,42,.18))!important}
[data-theme="white"] .product-art .brand-svg[data-contrast="light-stroke"]{color:#334155!important;fill:none!important;filter:drop-shadow(0 1px 1px rgba(15,23,42,.12))!important}
[data-theme="white"] .product-art .brand-svg[data-contrast="light-stroke"] path{fill:none!important;stroke:#334155!important}

/* Keep small copy comfortably readable without changing the overall layout. */
[data-theme="white"] body,[data-theme="white"] .workspace{color:#0f172a!important}
[data-theme="white"] .page-heading p,
[data-theme="white"] .section-title p,
[data-theme="white"] .panel p:not(.eyebrow),
[data-theme="white"] .panel li,
[data-theme="white"] .auth-panel>p,
[data-theme="white"] .empty-catalog p,
[data-theme="white"] .help-card p,
[data-theme="white"] .faq-section details p,
[data-theme="white"] .faq-intro p,
[data-theme="white"] .footer,
[data-theme="white"] .stat-caption,
[data-theme="white"] .feature small,
[data-theme="white"] .category-card small,
[data-theme="white"] .product-body>small,
[data-theme="white"] .form-note,
[data-theme="white"] .table-wrap td,
[data-theme="white"] .table-wrap td small,
[data-theme="white"] .admin-context-bar,
[data-theme="white"] .micro-note{color:#475569!important}
[data-theme="white"] .field>label,[data-theme="white"] label{color:#334155!important}
[data-theme="white"] .nav-label,[data-theme="white"] .brand small{color:#475569!important}
[data-theme="white"] input::placeholder,[data-theme="white"] textarea::placeholder{color:#64748b!important;opacity:1}
[data-theme="white"] .panel,[data-theme="white"] .product,[data-theme="white"] .stat,[data-theme="white"] .category-card,[data-theme="white"] .modal{border-color:#cbd5e1!important}
[data-theme="white"] .policy-section p strong{color:#1e293b!important}
[data-theme="white"] .page-heading h1,[data-theme="white"] .panel h2,[data-theme="white"] .panel h3,[data-theme="white"] .section-title h2,[data-theme="white"] .product-body h3,[data-theme="white"] .auth-panel>h2{color:#0f172a!important}

/* Request + approval workflow for Developer API keys. */
.api-access-panel{display:grid;gap:15px}
.api-access-message{display:grid;gap:9px;padding:16px 18px;border:1px solid var(--line);border-radius:14px;background:var(--panel2);background:color-mix(in srgb,var(--panel2) 82%,transparent)}
.api-access-message>strong{display:flex;align-items:center;gap:8px;color:var(--text);font-weight:750}
.api-access-message>strong svg{width:18px;height:18px}
.api-access-message p{margin:0;max-width:760px;line-height:1.75}
.api-access-message.approved{border-color:#34a77c70;background:#1c9b6712}
.api-access-message.pending{border-color:#d39a3e70;background:#d39a3e12}
.api-access-message.rejected{border-color:#d45a6c70;background:#d45a6c12}
.api-access-request{display:grid;gap:12px;margin-top:4px}
.api-access-request textarea{min-height:112px;line-height:1.65;resize:vertical}
.api-request-reason{min-width:220px;max-width:410px;max-height:120px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
.api-access-count{display:inline-flex;align-items:center;min-height:30px;padding:5px 10px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:11px;font-weight:700;white-space:nowrap}
[data-theme="white"] .api-access-message{background:#f8fafc;border-color:#cbd5e1}
[data-theme="white"] .api-access-message>strong{color:#0f172a}
[data-theme="white"] .api-access-message.approved{background:#ecfdf5;border-color:#86c9a8}
[data-theme="white"] .api-access-message.pending{background:#fffbeb;border-color:#e6c36e}
[data-theme="white"] .api-access-message.rejected{background:#fff1f2;border-color:#e5a2aa}

@media(max-width:760px){
 .api-access-message{padding:14px}
 .api-access-request .btn{width:100%}
 .api-request-reason{min-width:180px;max-width:260px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important}}

/* Account-wide announcements and verified wallet-credit celebrations. */
.notification-popup-modal{position:relative;isolation:isolate;width:min(94vw,560px);overflow:hidden;border-color:#8c76dd80;background:radial-gradient(ellipse at 50% -15%,#927aff30,transparent 58%),linear-gradient(145deg,#18172a,#111723);animation:notification-modal-in .42s cubic-bezier(.18,.8,.25,1) both}
.notification-popup-modal .modal-head{position:relative;z-index:3;margin-bottom:2px;padding-bottom:12px;border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent)}
.notification-popup-modal .modal-head h2{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.notification-popup-modal .modal-head .icon-btn{display:none}
.notification-popup-content{position:relative;z-index:1;display:grid;justify-items:center;gap:12px;padding:25px 12px 9px;text-align:center}
.notification-popup-content h3{max-width:440px;margin:4px 0 0;font-size:25px;line-height:1.2;letter-spacing:-.04em}
.notification-popup-content p{max-width:440px;margin:0;color:var(--muted);font-size:13px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}
.notification-popup-content .eyebrow{position:relative;z-index:2}
.notification-understood{position:relative;z-index:2;min-width:155px;margin-top:10px}
.deposit-success-icon,.broadcast-popup-icon{position:relative;z-index:2;display:grid;place-items:center;width:70px;height:70px;border:1px solid #64deb87a;border-radius:23px;background:linear-gradient(145deg,#41d5a526,#7e77ff20);color:#79e3bd;box-shadow:0 0 45px #4ce0ba22;animation:deposit-icon-pop .55s cubic-bezier(.16,1,.3,1) both}
.deposit-success-icon svg,.broadcast-popup-icon svg{width:32px;height:32px;stroke:currentColor}
.deposit-credited-amount{position:relative;z-index:2;margin-top:4px;font-size:clamp(40px,10vw,58px);line-height:1;font-weight:800;letter-spacing:-.065em;color:#7de7bf;text-shadow:0 0 30px #59d8aa45;font-variant-numeric:tabular-nums}
.credited-label{position:relative;z-index:2;margin-top:-7px;color:var(--muted);font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.deposit-confetti-field{position:absolute;z-index:0;inset:-30px 0 0;overflow:hidden;pointer-events:none}
.deposit-confetti-field i{position:absolute;top:-16px;width:8px;height:13px;border-radius:2px;background:hsl(var(--hue,240) 82% 67%);box-shadow:0 0 10px hsl(var(--hue,240) 82% 67% / .25);animation:deposit-confetti-fall 3.4s ease-in infinite;animation-delay:var(--delay,0s)}
.broadcast-popup-icon{border-color:#b39cff70;color:#bfadff;background:linear-gradient(145deg,#a88aff30,#ec8aca20);animation:broadcast-icon-glow 2s ease-in-out infinite alternate}
.broadcast-popup-content h3{margin-top:1px}
.broadcast-admin-form{display:grid;gap:6px}
.broadcast-popup-toggle{display:flex;align-items:flex-start;gap:12px;margin:2px 0 12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--panel2) 78%,transparent);cursor:pointer}
.broadcast-popup-toggle input{flex:0 0 18px;width:18px;height:18px;margin:2px 0 0;accent-color:var(--purple)}
.broadcast-popup-toggle span{display:grid;gap:4px}
.broadcast-popup-toggle strong{color:var(--text);font-size:12px}
.broadcast-popup-toggle small{color:var(--muted);font-size:11px;line-height:1.55}

/* Order retention is transparent, and delivery text is visually separated from metadata. */
.history-retention-note{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px;padding:13px 16px;border:1px solid color-mix(in srgb,#8c76dd 36%,var(--line));border-radius:13px;background:color-mix(in srgb,#8c76dd 8%,var(--panel));color:var(--muted)}
.history-retention-note>svg{width:18px;height:18px;margin-top:2px;color:#b8a5ff}
.history-retention-note p{margin:0;font-size:11px;line-height:1.7}
.history-retention-note strong{color:var(--text)}
.history-delivery{display:grid;gap:14px;margin:20px 0;padding:18px;border:1px solid color-mix(in srgb,#6cd9b0 42%,var(--line));border-radius:16px;background:radial-gradient(ellipse at 0 0,#53d4a510,transparent 48%),color-mix(in srgb,var(--panel2) 74%,transparent)}
.history-delivery-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.history-delivery-heading h3{margin:9px 0 4px;font-size:17px}
.history-delivery-heading p{margin:0;color:var(--muted);font-size:11px;line-height:1.6}
.delivery-private-pill{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:6px 9px;border:1px solid #65cfae55;border-radius:99px;background:#36a98212;color:#80ddbe;font-size:10px;font-weight:700}
.delivery-private-pill svg{width:13px;height:13px}
pre.history-delivery-content{max-height:310px;min-height:90px;margin:0;padding:16px;border:1px solid color-mix(in srgb,#6cd9b0 22%,var(--line));border-radius:11px;background:color-mix(in srgb,var(--bg) 78%,#07110f);color:var(--text);font-size:12px;line-height:1.75;white-space:pre-wrap;overflow:auto;overflow-wrap:anywhere;user-select:text}
.history-delivery-actions{display:flex;justify-content:flex-start;gap:9px;flex-wrap:wrap}
.history-delivery-actions svg{width:15px;height:15px}

/* Refined secure-store boot screen, including the existing recovery/error state. */
#app>.boot{position:relative;isolation:isolate;min-height:100vh;overflow:hidden;gap:12px;background:radial-gradient(ellipse at 50% 45%,#18142a 0,#0c0f19 58%);color:#f1ecff}
#app>.boot:before{position:absolute;z-index:-1;inset:0;content:"";background:radial-gradient(ellipse at 50% 41%,#927aff20,transparent 36%),radial-gradient(ellipse at 50% 110%,#42d5bd13,transparent 43%);pointer-events:none}
.boot-orbit{filter:drop-shadow(0 16px 35px #0005)}
.boot-orbit:after{position:absolute;inset:-10px;content:"";border:1px solid #c6b8ff16;border-radius:50%;animation:boot-orbit 8s linear infinite reverse}
.boot-orbit img{animation:boot-mark-breathe 2.8s ease-in-out infinite}
.boot strong{font-size:14px;letter-spacing:.025em}
.boot small{font-size:10px;letter-spacing:.075em}
.boot-progress{position:relative;width:168px;height:4px;background:#ffffff15;box-shadow:0 0 18px #9380ff18}
.boot-progress i{position:relative;overflow:hidden;box-shadow:0 0 12px #7ce2cc80}
.boot-progress i:after{position:absolute;inset:0;content:"";background:linear-gradient(90deg,transparent,#fff9,transparent);transform:translateX(-100%);animation:boot-progress-glint 1.3s ease-in-out infinite}
.boot h2{margin:0;font-size:20px;text-align:center;letter-spacing:-.025em}
.boot p{max-width:360px;margin:0;color:var(--muted);font-size:12px;text-align:center}
[data-theme="white"] #app>.boot{background:radial-gradient(ellipse at 50% 42%,#e9e5ff 0,#f8fafc 60%);color:#0f172a}
[data-theme="white"] #app>.boot:before{background:radial-gradient(ellipse at 50% 40%,#7960d619,transparent 38%),radial-gradient(ellipse at 50% 110%,#17a88311,transparent 44%)}
[data-theme="white"] .boot small,[data-theme="white"] .boot p{color:#475569}
[data-theme="white"] .boot-progress{background:#cbd5e1}
[data-theme="white"] .boot h2{color:#0f172a}
[data-theme="white"] .notification-popup-modal{border-color:#c4b5fd;background:radial-gradient(ellipse at 50% -15%,#e9e5ff,transparent 58%),linear-gradient(145deg,#fff,#f8fafc);color:#0f172a}
[data-theme="white"] .notification-popup-modal .modal-head{border-color:#e2e8f0}
[data-theme="white"] .notification-popup-modal .modal-head h2,[data-theme="white"] .notification-popup-content p,[data-theme="white"] .credited-label{color:#475569}
[data-theme="white"] .notification-popup-content h3{color:#0f172a}
[data-theme="white"] .deposit-credited-amount{color:#047857;text-shadow:none}
[data-theme="white"] .broadcast-popup-icon{color:#6545c9;background:#ede9fe}
[data-theme="white"] .broadcast-popup-toggle{background:#f8fafc;border-color:#cbd5e1}
[data-theme="white"] .broadcast-popup-toggle strong{color:#0f172a}
[data-theme="white"] .history-retention-note{background:#f5f3ff;border-color:#c4b5fd;color:#475569}
[data-theme="white"] .history-retention-note strong{color:#0f172a}
[data-theme="white"] .history-delivery{background:radial-gradient(ellipse at 0 0,#d1fae5 0,transparent 48%),#f8fafc;border-color:#86c9a8}
[data-theme="white"] .history-delivery-heading h3{color:#0f172a}
[data-theme="white"] .history-delivery-heading p{color:#475569}
[data-theme="white"] .delivery-private-pill{background:#ecfdf5;border-color:#86c9a8;color:#047857}
[data-theme="white"] pre.history-delivery-content{background:#fff;border-color:#cbd5e1;color:#0f172a}
@keyframes notification-modal-in{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes deposit-icon-pop{0%{opacity:0;transform:scale(.62) rotate(-10deg)}70%{transform:scale(1.08) rotate(2deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes deposit-confetti-fall{0%{opacity:0;transform:translate3d(0,-10px,0) rotate(0)}12%{opacity:1}100%{opacity:0;transform:translate3d(15px,390px,0) rotate(620deg)}}
@keyframes broadcast-icon-glow{from{box-shadow:0 0 20px #ad91ff18;transform:scale(.98)}to{box-shadow:0 0 45px #ad91ff55;transform:scale(1.04)}}
@keyframes boot-mark-breathe{50%{transform:scale(1.07);filter:drop-shadow(0 0 20px #ab8cffaa)}}
@keyframes boot-progress-glint{to{transform:translateX(110%)}}
@media(max-width:620px){.notification-popup-modal{width:min(96vw,560px);padding:22px}.notification-popup-content{padding:20px 5px 8px}.notification-popup-content h3{font-size:21px}.history-delivery{padding:14px}.history-delivery-heading{display:grid}.delivery-private-pill{justify-self:start}.history-delivery-actions .btn{flex:1}.broadcast-popup-toggle{padding:12px}}
@media(prefers-reduced-motion:reduce){.notification-popup-modal,.deposit-success-icon,.deposit-confetti-field i,.broadcast-popup-icon,.boot-orbit:after,.boot-orbit img,.boot-progress i:after{animation:none!important;transition:none!important}.deposit-confetti-field{display:none}}
