/* Native confirmation: top layer, keyboard focus and cancellation handled by dialog. */
.lq-confirm-dialog, .shop-preview-dialog {
  width: min(92vw, 32rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  margin: auto;
  padding: clamp(22px, 5vw, 32px);
  border: 1px solid var(--lq-line);
  border-radius: var(--linguaquest-radius-large, 22px);
  background: var(--lq-paper);
  color: var(--lq-navy);
  box-shadow: 0 18px 65px #102b5029;
}
.lq-confirm-dialog::backdrop, .shop-preview-dialog::backdrop { background: #10243bbb; }
.lq-confirm-dialog h2, .shop-preview-dialog h2 { margin: 8px 0 12px; font: 700 clamp(23px,5vw,30px)/1.2 var(--lq-serif); overflow-wrap: anywhere; }
.lq-confirm-dialog p, .shop-preview-dialog p { color: var(--lq-muted); line-height: 1.6; }
.lq-confirm-kicker { color: var(--lq-muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.lq-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.lq-confirm-actions button { flex: 1 1 9rem; min-height: 44px; padding: 11px 16px; border: 1px solid var(--lq-line); border-radius: 12px; cursor: pointer; font-weight: 700; }
.lq-confirm-cancel { background: var(--lq-paper); color: var(--lq-navy); }
.lq-confirm-accept { background: var(--lq-navy); color: #fff; }
.lq-confirm-dialog[data-tone="danger"] .lq-confirm-accept { background: #923e32; border-color: #923e32; }
.lq-confirm-actions button:focus-visible, .shop-cosmetic-actions button:focus-visible { outline: 3px solid var(--lq-cobalt); outline-offset: 3px; }

/* Light, accessible palettes; brand artwork stays unchanged. No button gradients. */
body[data-lq-theme="theme-brisa"], .cosmetic-preview[data-preview="theme-brisa"] {
  --lq-navy:#123d43; --lq-cobalt:#0b5960; --lq-paper:#fcfffd; --lq-ivory:#edf5f1; --lq-muted:#49655f; --lq-line:#c5d8cf;
  --linguaquest-navy:#123d43; --linguaquest-cobalt:#0b5960; --linguaquest-paper:#fcfffd; --linguaquest-ivory:#edf5f1; --linguaquest-line:#c5d8cf;
}
body[data-lq-theme="theme-lavanda"], .cosmetic-preview[data-preview="theme-lavanda"] {
  --lq-navy:#342449; --lq-cobalt:#5a3e8b; --lq-paper:#fffcff; --lq-ivory:#f3eff8; --lq-muted:#655775; --lq-line:#d8cde4;
  --linguaquest-navy:#342449; --linguaquest-cobalt:#5a3e8b; --linguaquest-paper:#fffcff; --linguaquest-ivory:#f3eff8; --linguaquest-line:#d8cde4;
}
body[data-lq-theme="theme-arena"], .cosmetic-preview[data-preview="theme-arena"] {
  --lq-navy:#4c3025; --lq-cobalt:#75442d; --lq-paper:#fffcf5; --lq-ivory:#f5eddf; --lq-muted:#725c50; --lq-line:#deccb7;
  --linguaquest-navy:#4c3025; --linguaquest-cobalt:#75442d; --linguaquest-paper:#fffcf5; --linguaquest-ivory:#f5eddf; --linguaquest-line:#deccb7;
}
body[data-lq-theme^="theme-"] {
  --bg-app:var(--lq-ivory); --bg-card:var(--lq-paper); --bg-elevated:var(--lq-paper); --bg-card-hover:var(--lq-ivory);
  --text:var(--lq-navy); --text-secondary:var(--lq-muted); --text-muted:var(--lq-muted); --border:var(--lq-line); --primary:var(--lq-cobalt); --accent:var(--lq-cobalt);
  background: var(--lq-ivory); color: var(--lq-navy);
}
body[data-lq-theme^="theme-"] :is(.screen,.screen-content,.editorial-sidebar) { background-color: var(--lq-ivory) !important; }
body[data-lq-theme^="theme-"] :is(.screen-header,.teacher-tabs,.qb-quiz-card,.shop-card,.glossary-card) { background-color:var(--lq-paper) !important; color:var(--lq-navy); border-color:var(--lq-line); }
body[data-lq-theme^="theme-"] :is(.primary-btn,.qb-btn-primary,.activation-btn,.shop-buy-btn,.shio-send-btn) { background: var(--lq-cobalt) !important; color:#fff !important; }

[data-profile-frame]:not([data-profile-frame="none"]) { position: relative; isolation: isolate; }
/* Transparent vector overlays: no image padding, resizing or per-frame animation. */
[data-profile-frame]:not([data-profile-frame="none"])::after { content:""; position:absolute; inset:0; z-index:5; border-radius:50%; pointer-events:none; border:0 !important; box-shadow:none !important; background-position:center; background-size:100% 100%; background-repeat:no-repeat; }
[data-profile-frame="frame-navy"]::after { background-image:url('../assets/cosmetics/frame-segmented.svg'); }
[data-profile-frame="frame-teal"]::after { background-image:url('../assets/cosmetics/frame-laurel.svg'); }
[data-profile-frame="frame-coral"]::after { background-image:url('../assets/cosmetics/frame-geometric.svg'); }
[data-profile-frame="frame-double"]::after { background-image:url('../assets/cosmetics/frame-insignia.svg'); }

[data-profile-background]:not([data-profile-background="none"]) { background-color:#ecf3f4 !important; background-position:center top !important; background-size:cover !important; }
[data-profile-background="background-horizon"] { background-image:url('../assets/cosmetics/horizon.svg') !important; }
[data-profile-background="background-leaf"] { background-image:url('../assets/cosmetics/leaf.svg') !important; }
[data-profile-background="background-grid"] { background-image:url('../assets/cosmetics/grid.svg') !important; }
#profile-screen .profile-card[data-profile-background]:not([data-profile-background="none"]) { padding:clamp(26px,5vw,48px) 24px 24px; border-radius:22px; border:1px solid var(--lq-line); }
[data-profile-background] :is(h2,.profile-name,.profile-title) { color:#102b50; }
.teacher-student-profile-card { padding:22px; border-radius:18px; border:1px solid var(--lq-line); margin-bottom:18px; }

.shop-intro { max-width:64rem; margin:0 auto 24px; }
.shop-intro h3 { font:700 clamp(26px,4vw,36px)/1.2 var(--lq-serif); margin:0 0 12px; color:var(--lq-navy); }
.shop-intro p,.shop-section-description { color:var(--lq-muted); line-height:1.6; }
.shop-section { max-width:64rem; margin:0 auto 32px; }
.shop-section h3 { font-size:20px; margin:0 0 6px; }
.shop-cosmetic-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:16px; }
.shop-cosmetic-card { min-width:0; border:1px solid var(--lq-line); border-radius:20px; overflow:hidden; background:var(--lq-paper); }
.shop-cosmetic-copy { padding:18px; }
.shop-cosmetic-copy h4 { margin:0 0 8px; font-size:18px; }
.shop-cosmetic-copy p { margin:0 0 16px; color:var(--lq-muted); line-height:1.5; font-size:14px; min-height:3em; }
.shop-cosmetic-actions { display:flex; flex-wrap:wrap; gap:8px; }
.shop-cosmetic-actions button { min-height:44px; padding:9px 14px; border:1px solid var(--lq-line); border-radius:12px; cursor:pointer; font-weight:700; background:var(--lq-paper); color:var(--lq-navy); }
.shop-cosmetic-actions .is-primary { background:var(--lq-navy); border-color:var(--lq-navy); color:white; }
.shop-cosmetic-actions button:disabled { cursor:default; opacity:.7; }
.shop-owned-label { display:inline-block; margin:0 0 10px; color:#14615a; font-weight:700; font-size:12px; }
.cosmetic-preview { min-height:176px; padding:24px; display:flex; align-items:center; justify-content:center; background:var(--lq-ivory); border-bottom:1px solid var(--lq-line); }
.cosmetic-avatar { width:108px; height:108px; display:grid; place-items:center; border-radius:50%; background:#fffdf8; color:#12355b; font-size:36px; font-weight:800; overflow:hidden; }
.cosmetic-avatar img { width:100%; height:100%; object-fit:cover; }
.cosmetic-theme-demo { background:var(--lq-paper); color:var(--lq-navy); border:1px solid var(--lq-line); border-radius:12px; width:100%; padding:14px; }
.cosmetic-theme-demo strong { display:block; font-size:18px; margin-bottom:10px; }
.cosmetic-theme-demo span { display:inline-block; border-radius:7px; padding:7px 14px; background:var(--lq-cobalt); color:white; font-weight:700; }
.shop-preview-dialog .cosmetic-preview { border-radius:14px; margin:16px 0; min-height:200px; }
.shop-refund-note { padding:14px 18px; background:#edf6f0; border:1px solid #bdd8c9; border-radius:14px; color:#245b43; line-height:1.5; }
@media (prefers-reduced-motion: reduce) { .lq-confirm-dialog,.shop-preview-dialog { animation:none !important; transition:none !important; } }
