@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --p-fire: #e85d04;
    --p-fire-soft: rgba(232, 93, 4, 0.15);
    --p-gold: #c9a84c;
    --p-bg: #0a0a0b;
    --p-surface: #141416;
    --p-surface2: #1c1c20;
    --p-text: #f0ede8;
    --p-muted: rgba(240, 237, 232, 0.5);
    --p-ok: #4ade80;
    --p-radius: 1rem;
    --p-touch: 2.75rem;
    --p-font: 'Outfit', system-ui, sans-serif;
    --p-display: 'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; }
body.p-body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--p-font);
    background: var(--p-bg);
    color: var(--p-text);
    line-height: 1.5;
}
.p-wrap {
    max-width: 32rem;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}
.p-hero {
    text-align: center;
    padding: 1.5rem 0 1rem;
}
.p-hero-badge {
    display: inline-block;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--p-fire);
    border: 1px solid rgba(232, 93, 4, 0.35);
    padding: 0.3rem 0.65rem;
    border-radius: 2rem;
    margin-bottom: 0.75rem;
}
.p-hero h1 {
    font-family: var(--p-display);
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 600;
    margin: 0 0 0.35rem;
    line-height: 1.05;
}
.p-hero h1 em { font-style: italic; color: var(--p-gold); }
.p-hero p { margin: 0; color: var(--p-muted); font-size: 0.88rem; }

.p-countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1.25rem 0;
}
.p-countdown-item {
    text-align: center;
    padding: 0.75rem 0.35rem;
    background: var(--p-surface);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--p-radius);
}
.p-countdown-val {
    font-family: var(--p-display);
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 600;
    color: var(--p-fire);
    line-height: 1;
}
.p-countdown-lbl {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p-muted);
    margin-top: 0.25rem;
}

.p-card {
    background: var(--p-surface);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: calc(var(--p-radius) + 0.15rem);
    padding: 1.15rem;
    margin-bottom: 1rem;
}
.p-card h2 {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.p-field { margin-bottom: 0.75rem; }
.p-field label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--p-muted);
    margin-bottom: 0.3rem;
}
.p-field input, .p-field select {
    width: 100%;
    min-height: var(--p-touch);
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--p-surface2);
    color: var(--p-text);
    font: inherit;
    font-size: 0.9rem;
}
.p-field input:focus, .p-field select:focus {
    outline: none;
    border-color: rgba(201, 168, 76, 0.45);
}
.p-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.p-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: var(--p-touch);
    padding: 0 1rem;
    border: none;
    border-radius: 0.75rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}
.p-btn--fire {
    background: linear-gradient(135deg, #e85d04, #c2410c);
    color: #fff;
    box-shadow: 0 4px 20px rgba(232, 93, 4, 0.35);
}
.p-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--p-text);
}
.p-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.p-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.p-status--ok { background: rgba(74,222,128,0.12); color: var(--p-ok); border: 1px solid rgba(74,222,128,0.3); }
.p-status--pend { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }

.p-peito {
    font-family: var(--p-display);
    font-size: clamp(2.5rem, 12vw, 4rem);
    font-weight: 600;
    color: var(--p-fire);
    text-align: center;
    line-height: 1;
    margin: 0.5rem 0;
}
.p-msg { font-size: 0.8rem; padding: 0.65rem 0.85rem; border-radius: 0.65rem; margin-bottom: 0.75rem; }
.p-msg--err { background: rgba(224,92,92,0.12); color: #e05c5c; border: 1px solid rgba(224,92,92,0.25); }
.p-msg--ok { background: rgba(74,222,128,0.1); color: var(--p-ok); }

.p-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
}
.p-topbar a { color: var(--p-muted); font-size: 0.78rem; text-decoration: none; }
.p-notif {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.78rem;
}
.p-notif strong { display: block; font-size: 0.82rem; }
.p-notif span { color: var(--p-muted); font-size: 0.72rem; }

#pix-qr { max-width: 100%; border-radius: 0.75rem; margin: 0.75rem auto; display: block; }
.p-copy {
    width: 100%;
    font-size: 0.72rem;
    padding: 0.65rem;
    border-radius: 0.5rem;
    background: var(--p-surface2);
    border: 1px dashed rgba(255,255,255,0.15);
    color: var(--p-muted);
    word-break: break-all;
    margin-bottom: 0.5rem;
}

.p-hub { text-align: center; }
.p-hub h2 { margin: 0 0 0.5rem; }
.p-hub-desc {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    color: var(--p-muted);
    line-height: 1.45;
}
.p-hub .p-btn { margin-bottom: 0.55rem; }
.p-link-muted {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: var(--p-muted);
    text-decoration: none;
}
.p-link-muted:hover { color: var(--p-gold); }
.p-form-foot {
    text-align: center;
    margin: 0.85rem 0 0;
    font-size: 0.78rem;
    color: var(--p-muted);
    line-height: 1.6;
}
.p-form-foot a { color: var(--p-gold); text-decoration: none; }
.p-back {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--p-muted);
    text-decoration: none;
}
.p-card-sub {
    margin: -0.35rem 0 0.85rem;
    font-size: 0.78rem;
    color: var(--p-muted);
}
.p-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}
.p-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.p-info-list li:last-child { border-bottom: none; }
.p-info-list span { color: var(--p-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Dashboard ── */
.p-imperson-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 1rem;
    padding: 0.65rem 1rem;
    padding-top: calc(0.65rem + env(safe-area-inset-top));
    background: linear-gradient(90deg, #e85d04, #dc2f02);
    color: #fff;
    font-size: clamp(0.72rem, 2.5vw, 0.82rem);
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(220, 47, 2, 0.35);
}
.p-imperson-banner__icon { font-size: 1.1rem; }
.p-imperson-banner__btn {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.p-imperson-banner__btn:hover { background: rgba(255, 255, 255, 0.28); }
.p-impersonando .p-dash { padding-top: 0; }

.p-dash-body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232, 93, 4, 0.12), transparent),
        var(--p-bg);
}
.p-dash {
    max-width: 32rem;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top) 1rem 0;
}
.p-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0 0.5rem;
}
.p-dash-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.p-dash-who { min-width: 0; }
.p-dash-who strong {
    display: block;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.p-dash-sub {
    display: block;
    font-size: 0.68rem;
    color: var(--p-muted);
    letter-spacing: 0.04em;
    margin-top: 0.1rem;
}
.p-dash-logout {
    flex-shrink: 0;
    min-height: 2.75rem;
    padding: 0 0.85rem;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--p-surface);
    color: var(--p-muted);
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.p-dash-logout:hover { color: var(--p-text); border-color: rgba(255,255,255,0.2); }

.p-avatar {
    position: relative;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--p-surface2);
    border: 2px solid rgba(232, 93, 4, 0.35);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.08);
}
.p-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.p-avatar-inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--p-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--p-fire);
}
.p-avatar-inicial--lg { font-size: 2.5rem; }

.p-countdown--dash { margin: 0.5rem 0 0.85rem; }

.p-dash-main {
    flex: 1;
    padding-bottom: 1rem;
}
.p-tab-panel { display: none; animation: pFadeIn 0.35s ease; }
.p-tab-panel.is-active { display: block; }
@keyframes pFadeIn {
    from { opacity: 0; transform: translateY(0.35rem); }
    to   { opacity: 1; transform: translateY(0); }
}

.p-card--glow {
    background: linear-gradient(145deg, var(--p-surface) 0%, rgba(28, 28, 32, 0.95) 100%);
    border-color: rgba(232, 93, 4, 0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.p-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.p-card-head h2 { margin: 0; }
.p-peito-lbl {
    margin: 0;
    font-size: 0.72rem;
    color: var(--p-muted);
    text-align: center;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.p-meta-center {
    text-align: center;
    font-size: 0.78rem;
    color: var(--p-muted);
    margin: 0;
}
.p-meta-sm { font-size: 0.72rem; margin-top: 0.25rem; }
.p-hint {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    color: var(--p-muted);
    text-align: center;
}
.p-hint--ok { color: var(--p-ok); }
.p-hint--err { color: #e05c5c; }
.p-reg-aceite {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0.85rem 0 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--p-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--p-surface2);
    cursor: pointer;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--p-muted);
    text-align: left;
}
.p-reg-aceite input {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    accent-color: var(--p-fire);
}
.p-reg-aceite a {
    color: var(--p-fire);
    font-weight: 600;
    text-decoration: none;
}
.p-reg-aceite a:hover { text-decoration: underline; }
.p-empty {
    margin: 0;
    font-size: 0.78rem;
    color: var(--p-muted);
}

.p-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.p-stat {
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: var(--p-surface2);
    border: 1px solid rgba(255,255,255,0.05);
}
.p-stat-lbl {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p-muted);
    margin-bottom: 0.25rem;
}
.p-stat-val {
    font-family: var(--p-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--p-fire);
    line-height: 1;
}
.p-stat-val--sm { font-size: 0.82rem; font-family: var(--p-font); font-weight: 500; color: var(--p-text); }

/* Foto upload */
.p-foto-upload {
    display: block;
    cursor: pointer;
    margin: 0.75rem auto 0;
    max-width: 11rem;
}
.p-foto-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--p-surface2);
    border: 2px dashed rgba(255,255,255,0.15);
    transition: all 0.3s ease;
}
.p-foto-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.p-foto-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: rgba(10,10,11,0.55);
    color: var(--p-text);
    font-size: 0.68rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.p-foto-preview:hover .p-foto-overlay,
.p-foto-preview:focus-within .p-foto-overlay { opacity: 1; }
.p-foto-preview:has(img:not([hidden])) .p-foto-overlay { opacity: 0; }
.p-foto-preview:has(img:not([hidden])):hover .p-foto-overlay { opacity: 1; }

/* Modal recorte foto */
.p-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.p-crop-modal[hidden] { display: none !important; }
.p-crop-sheet {
    width: 100%;
    max-width: 24rem;
    background: var(--p-surface);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.25rem;
    padding: 1.15rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: pCropUp 0.35s ease;
}
@keyframes pCropUp {
    from { opacity: 0; transform: translateY(1.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}
.p-crop-head { text-align: center; margin-bottom: 1rem; }
.p-crop-head h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.p-crop-head p { margin: 0; font-size: 0.72rem; color: var(--p-muted); }
.p-crop-stage {
    position: relative;
    width: 17.5rem;
    height: 17.5rem;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
    touch-action: none;
    cursor: grab;
}
.p-crop-stage:active { cursor: grabbing; }
.p-crop-img-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.p-crop-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}
.p-crop-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 8.75rem, rgba(10,10,11,0.82) 8.76rem);
    box-shadow: inset 0 0 0 2px rgba(232, 93, 4, 0.45);
}
.p-crop-controls {
    margin: 1rem 0 0.75rem;
    display: grid;
    gap: 0.35rem;
}
.p-crop-controls label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--p-muted);
}
.p-crop-controls input[type=range] {
    width: 100%;
    accent-color: var(--p-fire);
    min-height: 2.75rem;
}
.p-crop-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0.5rem;
}

.p-card--convite { margin-bottom: 0.75rem; }
.p-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

/* Participantes */
.p-seg-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.p-seg-btn {
    min-height: 2.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--p-surface2);
    color: var(--p-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.p-seg-btn.is-active {
    background: var(--p-fire-soft);
    border-color: rgba(232, 93, 4, 0.35);
    color: var(--p-fire);
}
.p-chip-scroll {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.p-chip-scroll::-webkit-scrollbar { display: none; }
.p-chip {
    flex-shrink: 0;
    min-height: 2.25rem;
    padding: 0 0.85rem;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--p-surface);
    color: var(--p-muted);
    font: inherit;
    font-size: 0.68rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}
.p-chip.is-active {
    background: var(--p-fire-soft);
    border-color: rgba(232, 93, 4, 0.4);
    color: var(--p-fire);
}
.p-comp-grid {
    display: grid;
    gap: 0.55rem;
}
.p-comp-card, .p-eq-card, .p-comp-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255,255,255,0.07);
    background: var(--p-surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}
.p-comp-card:hover, .p-eq-card:hover, .p-comp-row:hover {
    border-color: rgba(232, 93, 4, 0.25);
    transform: translateY(-1px);
}
.p-comp-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(232, 93, 4, 0.2);
}
.p-comp-thumb--eq { border-radius: 0.75rem; }
.p-comp-thumb--ini {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--p-surface2);
    font-family: var(--p-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--p-fire);
}
.p-comp-info { min-width: 0; flex: 1; }
.p-comp-info strong {
    display: block;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.p-comp-info span {
    display: block;
    font-size: 0.72rem;
    color: var(--p-muted);
    margin-top: 0.1rem;
}
.p-comp-info em {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.65rem;
    font-style: normal;
    color: var(--p-gold);
    letter-spacing: 0.06em;
}

.p-foto-upload--sm { max-width: 8rem; }
.p-foto-preview--eq { border-radius: 0.85rem; }

/* Modais */
.p-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.p-modal[hidden] { display: none !important; }
.p-modal-sheet {
    position: relative;
    width: 100%;
    max-width: 20rem;
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
    background: var(--p-surface);
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    animation: pFadeIn 0.3s ease;
}
.p-modal-sheet--wide { max-width: 24rem; max-height: 85dvh; overflow-y: auto; }
.p-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.65rem;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    background: transparent;
    color: var(--p-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.p-modal-foto {
    width: 7rem;
    height: 7rem;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(232, 93, 4, 0.35);
    background: var(--p-surface2);
}
.p-modal-foto--eq { border-radius: 1rem; }
.p-modal-foto img { width: 100%; height: 100%; object-fit: cover; }
.p-modal-peito {
    font-family: var(--p-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--p-fire);
    margin: 0 0 0.25rem;
}
.p-modal-sheet h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}
.p-modal-cidade {
    margin: 0;
    font-size: 0.82rem;
    color: var(--p-muted);
}
.p-modal-membros {
    margin-top: 1rem;
    display: grid;
    gap: 0.45rem;
    text-align: left;
}

/* Tab bar */
.p-tabs {
    position: sticky;
    bottom: 0;
    display: flex;
    overflow-x: auto;
    gap: 0.1rem;
    scrollbar-width: none;
    gap: 0.15rem;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--p-bg) 70%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}
.p-tabs::-webkit-scrollbar { display: none; }
.p-tab {
    position: relative;
    flex: 1 0 3.5rem;
    min-width: 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.25rem;
    padding: 0.35rem 0.15rem;
    border: none;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--p-muted);
    font: inherit;
    font-size: 0.55rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}
.p-tab svg {
    width: 1.15rem;
    height: 1.15rem;
    transition: transform 0.3s ease;
}
.p-tab.is-active {
    color: var(--p-fire);
    background: var(--p-fire-soft);
}
.p-tab.is-active svg { transform: scale(1.08); }
.p-tab-badge {
    position: absolute;
    top: 0.15rem;
    right: 0.1rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 1rem;
    background: var(--p-fire);
    color: #fff;
    font-size: 0.55rem;
    font-style: normal;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Camisetas — seleção com estoque */
.p-camiseta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}
.p-camiseta-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 4.5rem;
    padding: 0.75rem 0.5rem;
    border-radius: 1rem;
    border: 1px solid var(--p-border);
    background: var(--p-surface2);
    color: var(--p-text);
    font: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.p-camiseta-opt:hover,
.p-camiseta-opt:focus-visible {
    border-color: rgba(232, 93, 4, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    outline: none;
}
.p-camiseta-size {
    font-family: var(--p-display);
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 600;
    color: var(--p-fire);
    line-height: 1;
}
.p-camiseta-qty {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--p-muted);
}

@media (min-width: 480px) {
    .p-wrap { padding: 1.5rem; }
    .p-dash { padding-left: 1.5rem; padding-right: 1.5rem; }
    .p-tabs { margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }
    .p-camiseta-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Auth (login / cadastro) */
.p-auth { position: relative; overflow-x: hidden; }
.p-auth-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232, 93, 4, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(201, 168, 76, 0.08), transparent 50%), var(--p-bg);
}
.p-auth-wrap {
    position: relative; z-index: 1; max-width: 26rem; margin: 0 auto;
    padding: 1rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
}
.p-auth-back {
    display: inline-flex; align-items: center; min-height: var(--p-touch); margin-bottom: 0.5rem;
    color: var(--p-muted); font-size: 0.82rem; text-decoration: none; transition: color 0.3s ease;
}
.p-auth-back:hover { color: var(--p-text); }
.p-auth-head { text-align: center; margin-bottom: 1rem; }
.p-auth-eyebrow {
    display: inline-block; font-size: 0.62rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--p-fire); margin-bottom: 0.5rem;
}
.p-auth-head h1 {
    font-family: var(--p-display); font-size: clamp(2.1rem, 9vw, 3rem);
    font-weight: 600; margin: 0 0 0.35rem; line-height: 1.05;
}
.p-auth-head h1 em { font-style: italic; color: var(--p-gold); }
.p-auth-head p { margin: 0; color: var(--p-muted); font-size: clamp(0.82rem, 2.5vw, 0.92rem); }
.p-auth-steps { display: flex; gap: 0.35rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.p-auth-steps li {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--p-muted); text-align: center;
}
.p-auth-steps li span {
    display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem;
    border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.72rem; font-weight: 700;
    transition: all 0.3s ease;
}
.p-auth-steps li.is-active { color: var(--p-fire); }
.p-auth-steps li.is-active span {
    background: linear-gradient(135deg, #e85d04, #c2410c); border-color: transparent; color: #fff;
    box-shadow: 0 4px 16px rgba(232, 93, 4, 0.35);
}
.p-auth-card {
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    background: rgba(20, 20, 22, 0.92); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.p-auth-card .p-field input::placeholder { color: rgba(240, 237, 232, 0.28); }

/* Regulamento HTML */
.p-reg-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    max-width: 42rem; margin: 0 auto; padding: 1rem 1rem 0;
}
.p-reg-toolbar-actions { display: flex; gap: 0.5rem; }
.p-reg-btn-sm { width: auto; min-height: 2.5rem; padding: 0 1rem; font-size: 0.78rem; }
.p-reg-doc { max-width: 42rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.p-reg-header {
    text-align: center; padding: 1rem 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 1.5rem;
}
.p-reg-header h1 { font-family: var(--p-display); font-size: clamp(2rem, 8vw, 2.8rem); margin: 0.5rem 0 0.25rem; }
.p-reg-event { margin: 0; color: var(--p-fire); font-size: 0.88rem; font-weight: 600; }
.p-reg-meta {
    list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap;
    justify-content: center; gap: 0.5rem 1rem; font-size: 0.78rem; color: var(--p-muted);
}
.p-reg-meta strong { color: var(--p-text); font-weight: 600; }
.p-reg-section { margin-bottom: 1.75rem; }
.p-reg-section h2 {
    font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--p-gold); margin: 0 0 0.65rem;
}
.p-reg-section p, .p-reg-section li {
    font-size: clamp(0.86rem, 2.5vw, 0.95rem); color: rgba(240, 237, 232, 0.82); line-height: 1.65;
}
.p-reg-section ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.p-reg-section li { margin-bottom: 0.4rem; }
.p-reg-cats { display: grid; grid-template-columns: 1fr; gap: 0.45rem; margin: 0.85rem 0 1rem; }
.p-reg-cat {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.65rem;
    padding: 0.65rem 0.85rem; border-radius: 0.75rem; background: var(--p-surface);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.p-reg-cat-num { font-family: var(--p-display); font-size: 1.1rem; color: var(--p-muted); }
.p-reg-cat-name { font-size: 0.82rem; }
.p-reg-cat-km {
    font-size: 0.68rem; font-weight: 700; color: var(--p-fire); background: var(--p-fire-soft);
    padding: 0.2rem 0.5rem; border-radius: 2rem;
}
.p-reg-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0 1rem; font-size: 0.88rem; }
.p-reg-table th, .p-reg-table td {
    padding: 0.65rem 0.75rem; border: 1px solid rgba(255, 255, 255, 0.08); text-align: left;
}
.p-reg-table th {
    background: var(--p-surface); color: var(--p-gold);
    font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.p-reg-updated { font-size: 0.75rem !important; color: var(--p-muted) !important; margin-top: 1rem !important; }
@media (min-width: 600px) { .p-reg-cats { grid-template-columns: 1fr 1fr; } }
@media print {
    .no-print { display: none !important; }
    body.p-reg-page { background: #fff; color: #111; }
    .p-reg-doc { max-width: none; padding: 0; }
    .p-reg-section p, .p-reg-section li { color: #222; }
    .p-reg-section h2 { color: #a16207; }
    .p-reg-cat { border-color: #ddd; background: #f9f9f9; }
    .p-reg-table th { background: #f3f3f3; }
}
