/* PADRYZE components: class-based CSS on top of tokens.css. Prefix: pv-. */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); }
h1, h2, .pv-display { font-family: var(--font-display); }

/* Logo: the Momentum Orbit symbol and the PADRYZE wordmark. Size it with font-size.
   Use pv-logo__symbol--reversed on Deep Night. */
.pv-logo { display: inline-flex; align-items: center; gap: .45em; color: var(--ink); text-decoration: none; line-height: 1; }
.pv-logo__symbol { width: 1.5em; height: 1.5em; flex: none; background: url("brand/padryze-symbol.svg") center / contain no-repeat; }
.pv-logo__symbol--reversed, [data-theme="court"] .pv-logo__symbol { background-image: url("brand/padryze-symbol-reversed.svg"); }
.pv-logo__word { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; }

/* Orbit pattern: behind content only, never under text that must be read. */
.pv-pattern-orbit { background-image: url("brand/pattern-orbit.svg"); background-size: 240px 240px; }
.pv-demo { padding: var(--space-16); display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.pv-demo--stack { display: block; }

/* Button */
.pv-button { font: inherit; font-size: 16px; font-weight: 600; line-height: 1.15; padding: var(--space-16) 22px; border: 1px solid var(--primary); border-radius: var(--radius-7); background: var(--primary); color: var(--on-primary); cursor: pointer; }
.pv-button--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.pv-button--small { font-size: 13px; padding: 10px 14px; }
.pv-button--court { min-height: var(--touch-court); padding: 0 var(--space-32); font-size: 32px; font-weight: 700; border-radius: var(--radius-12); }
.pv-button:disabled { opacity: .38; cursor: default; }
.pv-button:focus-visible, .pv-link:focus-visible, .pv-select:focus-visible, .pv-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Badge and tag */
.pv-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-20); background: var(--success-soft); color: var(--success); font-size: 12px; line-height: 1.15; }
.pv-badge--error { background: var(--danger-soft); color: var(--danger); }
.pv-badge--rec { background: var(--rec); color: var(--on-rec); font-weight: 700; letter-spacing: 1px; }
.pv-badge--rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pv-tag { display: inline-block; border: 1px solid var(--line); padding: var(--space-8) var(--space-12); border-radius: var(--radius-30); font-size: 12px; line-height: 1.15; color: var(--ink); }
.pv-rec-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--rec); }

/* Text helpers */
.pv-eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 700; line-height: 1.5; }
.pv-muted { color: var(--muted); font-size: 13px; }
.pv-error { color: var(--danger); }
.pv-link { color: var(--indigo); }
.pv-button--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Card */
.pv-card { background: var(--surface); padding: var(--space-26); border: 1px solid var(--line); border-radius: var(--radius-12); }
.pv-card h2 { font-size: 20px; margin: 0 0 14px; }
.pv-card p { margin: 0; line-height: 1.5; }

/* Court status panel */
.pv-court { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); padding: var(--space-24); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-12); }
.pv-court h2 { font-size: 20px; margin: 0 0 var(--space-8); }
.pv-court p { margin: 0; color: var(--muted); }
.pv-court-state { display: inline-flex; align-items: center; gap: var(--space-8); }
.pv-timer { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-court--screen h2 { font-size: 48px; line-height: 1.1; }
.pv-court--screen p { font-size: 24px; }
.pv-court--screen .pv-timer { font-size: 120px; line-height: 1; }

/* QR join card */
.pv-qr-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--qr-surface); padding: var(--space-26); border: 1px solid var(--line); border-radius: var(--radius-12); }
.pv-qr-card h2 { font-size: 20px; margin: var(--space-8) 0; }
.pv-qr-card p { margin: 0 0 var(--space-8); line-height: 1.5; }
.pv-qr-plate { width: min(32vw, var(--qr-portal)); height: auto; aspect-ratio: 1; padding: var(--space-8); background: var(--qr-plate); border: 1px solid var(--line); border-radius: var(--radius-8); box-sizing: border-box; }
@media (max-width: 700px) { .pv-qr-card { flex-direction: column; text-align: center; } .pv-qr-plate { width: min(70vw, var(--qr-portal)); } }

/* Notice */
.pv-notice { padding: var(--space-12); background: var(--notice); color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.pv-notice--error { background: var(--danger-soft); color: var(--danger); }
.pv-notice:empty { display: none; }

/* Field */
.pv-field { display: block; font-size: 13px; font-weight: 600; }
.pv-input { display: block; width: 100%; box-sizing: border-box; padding: 11px 12px; margin-top: 5px; background: var(--surface); color: var(--ink); border: 1px solid var(--field-border); border-radius: var(--radius-6); font: inherit; font-weight: 400; }
.pv-select { padding: var(--space-8); background: var(--surface); color: var(--ink); border: 1px solid var(--field-border); border-radius: var(--radius-6); font: inherit; }
.pv-form { display: grid; gap: 13px; }

/* Session row */
.pv-session { background: var(--surface); padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-10); }
.pv-session-head { display: flex; justify-content: space-between; gap: 15px; }
.pv-session-head strong { font-size: 16px; }
.pv-session small { display: block; margin-bottom: 14px; color: var(--muted); }
.pv-session p { font-size: 13px; line-height: 1.5; margin: var(--space-8) 0; }
.pv-clip-row { display: flex; align-items: center; gap: var(--space-12); flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }
.pv-clip-row span { font-size: 13px; }

/* Video player */
.pv-section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); margin-bottom: var(--space-16); }
.pv-section-heading h2 { font-size: 20px; margin: 0; }
.pv-section-heading span { font-size: 12px; color: var(--muted); }
.pv-video { display: block; width: 100%; min-height: 220px; max-height: 520px; background: var(--video); border-radius: var(--radius-12); }
.pv-playback { display: flex; align-items: center; gap: var(--space-16); margin-top: var(--space-12); font-size: 14px; }

/* Camera preview */
.pv-preview { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-8); background: var(--preview); }

/* App header */
.pv-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); }
.pv-nav { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.pv-nav a { color: var(--ink); text-decoration: none; }
.pv-nav span { color: var(--muted); }
@media (max-width: 700px) { .pv-nav { flex-wrap: wrap; justify-content: flex-end; } }
