.xpv-root, .xpv-root * { box-sizing: border-box; }
.xpv-root { position: relative; color: #eaf1f8; font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.xpv-root button, .xpv-root input { font: inherit; }
.xpv-launcher { background: #101923; color: #eaf1f8; border: 1px solid #32465b; border-radius: 15px; padding: clamp(16px,3vw,28px); max-width: 820px; margin: 16px auto; }
.xpv-launcher h2 { color: inherit; font-size: 1.55rem; margin: 0 0 8px; }
.xpv-launcher h3 { color: inherit; font-size: 1.12rem; margin: 24px 0 8px; }
.xpv-launcher p { color: #b7c5d3; margin: 8px 0 15px; }
.xpv-actions, .xpv-album-list, .xpv-control-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.xpv-btn { padding: 12px 16px; border-radius: 10px; border: 1px solid #657c91; background: #273f55; color: #fff; cursor: pointer; line-height: 1.25; min-height: 44px; }
.xpv-btn:hover { background: #365773; }
.xpv-btn:focus-visible, .xpv-root input:focus-visible { outline: 3px solid #cce6fc; outline-offset: 2px; }
.xpv-btn-primary { background: #426d8e; border-color: #83a6bf; font-weight: 650; }
.xpv-btn-secondary { background: #1b2936; }
.xpv-btn:disabled { opacity: .5; cursor: not-allowed; }
.xpv-settings { margin-top: 22px; padding: 15px; border: 1px solid #45576b; border-radius: 10px; }
.xpv-settings label { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.xpv-settings input[type=checkbox] { width: 20px; height: 20px; }
.xpv-settings summary { cursor: pointer; padding: 8px 0; }
.xpv-setting-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin: 12px 0; }
.xpv-setting-grid label { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; font-size: .88rem; }
.xpv-setting-grid input { max-width: 100%; width: 100%; border-radius: 6px; padding: 6px; background: #f8fafc; color: #162332; border: 1px solid #9aabb9; }
.xpv-hint { font-size: .85rem; color: #afc0ce; }
.xpv-stage { position: fixed; inset: 0; z-index: 2147482000; background: #000; color: #fff; display: none; overflow: hidden; touch-action: manipulation; }
.xpv-root.xpv-active .xpv-stage { display: block; }
.xpv-canvas { width: 100%; height: 100%; display: block; background: #000; touch-action: manipulation; }
.xpv-toast { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; background: rgba(10,25,38,.86); border-radius: 9px; padding: 8px 13px; font-size: 14px; pointer-events: none; max-width: 90vw; text-align: center; display: none; }
.xpv-toast.xpv-visible { display: block; }
.xpv-overlay { position: absolute; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(2,8,15,.93); overflow: auto; }
.xpv-overlay.xpv-visible { display: flex; }
.xpv-panel { width: min(640px,100%); max-height: 92dvh; overflow: auto; padding: 12px; text-align: center; }
.xpv-panel h2 { color: #fff; font-size: clamp(20px,3vw,27px); margin: 0 0 14px; }
.xpv-panel p { color: #c2d0da; }
.xpv-counter { margin: 8px 0 18px; color: #bacad7; }
.xpv-cal-controls { position: absolute; z-index: 12; bottom: 12px; left: 50%; transform: translateX(-50%); display: none; width: min(750px,95%); padding: 12px; background: rgba(5,14,24,.94); border: 1px solid #677f96; border-radius: 12px; text-align: center; }
.xpv-cal-controls.xpv-visible { display: block; }
.xpv-cal-controls strong { margin-right: 10px; }
.xpv-cal-controls .xpv-control-row { justify-content: center; }
.xpv-cal-controls .xpv-btn { min-width: 55px; }
.xpv-status { font-size: .88rem; color: #cedae4; }
.xpv-rotate { z-index: 30; background: #050b10; text-align: center; font-size: 22px; }
.xpv-error { white-space: pre-wrap; color: #ffb9b9; overflow-wrap: anywhere; }
@media (orientation: portrait) {
  .xpv-root.xpv-active .xpv-rotate { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .xpv-btn { transition: none; }
}
