/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables */
:root {
    --color-text: #1a1a1a;
    --color-text-secondary: #666;
    --color-text-muted: #999;
    --color-bg: #fff;
    --color-bg-secondary: #f7f7f7;
    --color-border: #e0e0e0;
    --color-accent: #1a1a1a;
    --color-error: #c53030;
    --color-success: #2f855a;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Loading */
.loading {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Page Layout - no vertical stretching */
.page {
    min-height: 100vh;
}

/* Header - compact, functional */
.site-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
}

.site-header--logged-in {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.user-info:hover #user-name {
    text-decoration: underline;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

#user-name {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Hero — landing page main section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 56px 24px 32px;
    max-width: 440px;
    margin: 0 auto;
}

/* Headline — large, bold, impactful */
.hero .headline {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.subheadline {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 2;
    margin-bottom: 32px;
}

/* Belief statement — grounding copy below button */
.belief {
    margin: 32px 0;
    padding: 0;
}

.belief p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.belief p:last-child {
    font-weight: 500;
    color: var(--color-text);
}

/* Google sign-in button — full width, dark, prominent */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: var(--color-accent);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-google:hover {
    opacity: 0.85;
}

.btn-google:focus {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.btn-google svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.btn-logout {
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-logout:hover {
    color: var(--color-text);
    border-color: var(--color-text-secondary);
}

.btn-admin {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-admin:hover {
    opacity: 0.8;
}

.is-admin .btn-admin {
    display: inline-flex;
}

.btn-primary {
    width: 100%;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-bg);
    background: var(--color-accent);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-primary:focus {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #fff;
    background: #25d366;
    border: none;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-whatsapp:hover {
    opacity: 0.85;
}

.btn-whatsapp:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

/* Profile actions — logout & admin below profile */
.profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

/* Trust copy - grouped below button */
.trust-group {
    margin-top: 12px;
    font-size: 0.6875rem; /* 11px */
    color: var(--color-text-muted);
    line-height: 1.5;
}

.trust-group p + p {
    margin-top: 2px;
}

/* Clarifications - footer fine print */
.clarifications {
    padding: 16px 24px;
    max-width: 440px;
    margin: 0 auto;
    border-top: 1px solid var(--color-border);
}

.clarifications ul {
    list-style: none;
    display: flex;
    flex-direction: row; /* horizontal - more compact */
    flex-wrap: wrap;
    gap: 4px 12px;
}

.clarifications li {
    font-size: 0.6875rem; /* 11px - matches trust copy */
    color: var(--color-text-muted);
}

.privacy-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-decoration: underline;
}

/* Privacy Page */
.privacy-content {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 24px;
}

.privacy-content h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 32px;
}

.privacy-content section {
    margin-bottom: 24px;
}

.privacy-content h2 {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.privacy-content p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* Error Message */
.error-message {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    font-size: 0.875rem;
    color: var(--color-error);
    background: #fff5f5;
    border: 1px solid #feb2b2;
}

/* Content (Logged In) */
.content {
    flex: 1;
    padding: 48px 24px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.profile-layout {
    max-width: 984px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.profile-col-left,
.profile-col-right {
    display: flex;
    flex-direction: column;
}

.profile-col-right .profile-card {
    flex: 1;
}

.profile-actions {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .profile-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 24px;
        align-items: start;
    }
}

/* Profile Section */
.profile-card {
    position: relative;
    padding: 32px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 16px;
}

.profile-card + .profile-card {
    margin-top: 16px;
}

#tags-section + #tags-edit-section {
    margin-top: 6px;
}

/* Profile Header — horizontal: avatar left, info right */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-header__info {
    flex: 1;
    min-width: 0;
}

.profile-header__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.profile-header__name {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.profile-header__summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.profile-detail {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.btn-icon-edit {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s ease;
}

.btn-icon-edit:hover {
    opacity: 0.8;
}

/* Edit button — profile card */
#edit-profile-btn {
    top: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid var(--color-border);
}

/* + button — tags card */
#edit-tags-btn {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    background: #14532d;
}

/* Form actions (edit mode) */
.profile-form__actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.profile-form__actions .btn-primary {
    flex: 1;
}

.profile-form__actions .btn-secondary {
    flex: 0;
}

/* Tags View Mode — inside profile card */
.tags-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tags-view__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-view {
    display: inline-block;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.tag-view.selected {
    color: #14532d;
    background: #f0fdf4;
    border-color: #14532d;
}

.tag-view--interactive {
    cursor: pointer;
    user-select: none;
}

.tag-view--interactive:hover {
    border-color: #14532d;
    color: #14532d;
}

.tags-view__empty {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.tags-view__add-btn {
    align-self: flex-start;
}

.tags-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tag-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    gap: 0;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tag-tab {
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.tag-tab:hover {
    color: var(--color-text);
}

.tag-tab.active {
    color: var(--color-text);
    font-weight: 600;
}

.tag-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-text);
}

.tag-panel {
    display: none;
}

.tag-panel.active {
    display: block;
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* Media */
.profile-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
}

.media-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-view__empty {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.media-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    transition: background 0.15s ease;
}

.media-item:hover {
    background: var(--color-bg-secondary, #f5f5f5);
}

.media-item__url {
    flex: 1;
    font-size: 0.875rem;
    color: var(--color-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-item__url:hover {
    text-decoration: underline;
}

.media-item__edit {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.media-item__edit:hover {
    opacity: 0.7;
}

.media-item__type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 60px;
}



/* Inline edit state */
.media-item--editing {
    flex-wrap: wrap;
    gap: 6px;
    background: var(--color-bg);
    border-color: var(--color-text);
}

.media-inline__url {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    background: var(--color-bg);
    color: var(--color-text);
}

.media-inline__url:focus {
    outline: none;
    border-color: var(--color-text);
}

.media-inline__save,
.media-inline__cancel,
.media-inline__delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.media-inline__save {
    color: var(--color-success);
}

.media-inline__save:hover {
    background: #f0fff4;
}

.media-inline__cancel {
    color: var(--color-text-secondary);
}

.media-inline__cancel:hover {
    color: var(--color-text);
    background: var(--color-bg-secondary);
}

.media-inline__add-save {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-success);
}

.media-inline__add-save:hover {
    background: #f0fff4;
}

.media-item--empty {
    border-style: dashed;
    opacity: 0.6;
}

.media-item--empty:hover {
    opacity: 1;
}

.media-item__add {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

.media-item__add:hover {
    color: var(--color-text);
}

.media-item--adding {
    flex-wrap: wrap;
    gap: 6px;
    background: var(--color-bg);
    border-color: var(--color-text);
}

.media-inline__delete {
    color: #dc2626;
}

.media-inline__delete:hover {
    background: #fef2f2;
}


/* Form */
.profile-form {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.form-group input::placeholder {
    color: var(--color-text-muted);
}

.birthday-selects {
    display: flex;
    gap: 8px;
}

.birthday-selects select {
    flex: 1;
}

/* Floating range labels — positioned above thumbs */
.range-label {
    position: absolute;
    bottom: 36px;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    pointer-events: none;
    z-index: 3;
    white-space: nowrap;
}

/* Dual Range Slider */
.range-slider {
    position: relative;
    margin-top: 16px;
    padding: 48px 14px 10px;
}

.range-slider-track {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 22px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
}

.range-slider-fill {
    position: absolute;
    bottom: 22px;
    height: 4px;
    background: var(--color-text);
    border-radius: 2px;
    pointer-events: none;
}

/* Thumb handles */
.range-thumb {
    position: absolute;
    bottom: 10px;
    width: 28px;
    height: 28px;
    background: var(--color-bg);
    border: 2px solid var(--color-text);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: grab;
    transform: translateX(-50%);
    z-index: 2;
    touch-action: none;
    transition: box-shadow 0.15s ease;
}

.range-thumb:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.range-thumb.dragging {
    cursor: grabbing;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

/* Profile Message */
.profile-message {
    margin-top: 16px;
    padding: 12px 16px;
    font-size: 0.875rem;
    border-radius: 6px;
}

.profile-message.success {
    color: var(--color-success);
    background: #f0fff4;
    border: 1px solid #9ae6b4;
}

.profile-message.error {
    color: var(--color-error);
    background: #fff5f5;
    border: 1px solid #feb2b2;
}

/* Subscription Banner */
.subscription-banner {
    max-width: 880px;
    margin: 0 auto;
    padding: 16px 24px;
}

.sub-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sub-badge {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 999px;
}

.sub-badge--active {
    color: #14532d;
    background: #f0fdf4;
    border: 1px solid #14532d;
}

.sub-next-payment {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.sub-cta-text {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.btn-subscribe {
    width: auto;
    padding: 10px 24px;
}

/* Profile Completion */
.profile-completion {
    margin-top: 8px;
}

.profile-completion__link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.profile-completion__label {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.profile-completion__bar {
    flex: 1;
    max-width: 120px;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
}

.profile-completion__fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.profile-completion__pct {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* Castings Page */
.castings-content {
    max-width: none;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 32px 22%;
    box-sizing: border-box;
}

.castings-header {
    margin-bottom: 24px;
}

.castings-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.castings-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-top: 4px;
}

.castings-count {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    margin-top: 4px;
}

.matches-empty {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Country list */
.country-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 16px;
}

.country-chip {
    padding: 5px 12px;
    font-family: inherit;
    font-size: 0.8125rem;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    color: var(--color-text-secondary);
    transition: background 0.15s ease;
}

.country-chip:hover {
    background: var(--color-bg-secondary, #f5f5f5);
}

/* Match Groups */
.castings-grid {
    display: flex;
    flex-direction: column;
}

.match-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.match-tab {
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    color: var(--color-text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

.match-tab:hover {
    background: var(--color-bg-secondary, #f5f5f5);
}

.match-tab.active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

.match-tab__count {
    font-size: 0.6875rem;
    font-weight: 600;
    opacity: 0.5;
    margin-left: 4px;
}

.match-panel {
    display: none;
}

.match-panel.active {
    display: block;
}

.match-group-cards {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.match-group-cards .casting-card {
    flex: 0 0 300px;
}

.match-group-cards .casting-card:first-child {
    margin-left: auto;
}

.match-group-cards .casting-card:last-child {
    margin-right: auto;
}

.casting-card__highlight {
    font-size: 1.1rem;
    line-height: 1;
}

/* Card */
.casting-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    animation: cardFadeIn 0.4s ease both;
}

.casting-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Image */
.casting-card__image {
    position: relative;
}

.casting-card__image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    -webkit-user-drag: none;
    user-select: none;
}

/* Card Body */
.casting-card__body {
    padding: 12px 16px;
}

.casting-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.casting-tag {
    font-size: 0.6875rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.casting-tag--matched {
    background: #f0fdf4;
    color: #14532d;
    border-color: #14532d;
}

.casting-card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.casting-card__info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.casting-card__info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.info-icon {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

/* Card Footer */
.casting-card__footer {
    padding: 8px 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.casting-tag--category {
    background: #fef9c3;
    color: #1a1a1a;
    border-color: #1a1a1a;
}

.casting-card__match-id {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px 14px;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    opacity: 0.6;
}

.btn-copy-id {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: inherit;
    line-height: 0;
    border-radius: 4px;
}

.btn-copy-id:hover {
    opacity: 1;
    color: var(--color-text);
}

.btn-postularme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--color-bg);
    background: var(--color-text);
    border: none;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-postularme svg {
    flex-shrink: 0;
}

.btn-postularme:hover {
    opacity: 0.85;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #1a1a1a;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-whatsapp svg {
    flex-shrink: 0;
}

.btn-whatsapp:hover {
    opacity: 0.85;
}

.btn-casting-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-casting-share svg {
    flex-shrink: 0;
}

.btn-casting-share:hover {
    border-color: var(--color-text);
    background: var(--color-bg-secondary, #f5f5f5);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox__img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    display: block;
}

.lightbox__close {
    position: absolute;
    top: -36px;
    right: 0;
    padding: 4px 12px;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.lightbox__close:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

/* Onboarding Wizard */
.step-dots {
    display: flex;
    gap: 8px;
    margin: 20px 0 8px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background 0.2s ease;
}

.step-dot.active {
    background: var(--color-text);
}

.onboarding-step {
    display: none;
}

.onboarding-step.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-nav {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.step-nav .btn-primary {
    flex: 1;
}

.btn-secondary {
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    color: var(--color-text);
    border-color: var(--color-text-secondary);
}

/* Shake animation for validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.4s ease;
}

/* Debug Console */
.debug-console {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: #1a1a1a;
    font-family: "SF Mono", Monaco, "Consolas", monospace;
    font-size: 11px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2a2a2a;
    color: #999;
    border-bottom: 1px solid #333;
}

.debug-header strong {
    font-weight: 500;
}

.debug-controls {
    display: flex;
    gap: 8px;
}

.debug-btn {
    padding: 2px 8px;
    font-family: inherit;
    font-size: 10px;
    color: #999;
    background: transparent;
    border: 1px solid #444;
    cursor: pointer;
}

.debug-btn:hover {
    color: #fff;
    border-color: #666;
}

.debug-output {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    color: #ccc;
}

.debug-entry {
    padding: 2px 0;
    display: flex;
    gap: 8px;
}

.debug-time {
    color: #666;
    flex-shrink: 0;
}

.debug-message {
    word-break: break-word;
}

.debug-error .debug-message {
    color: #f56565;
}

.debug-warn .debug-message {
    color: #ecc94b;
}

.debug-info .debug-message {
    color: #63b3ed;
}

/* Responsive */
@media (max-width: 600px) {
    .site-header {
        padding: 12px 16px;
    }

    .hero {
        padding: 40px 20px 24px;
    }

    .hero .headline {
        font-size: 2rem;
    }

    .clarifications {
        padding: 12px 20px;
    }

    .clarifications ul {
        flex-direction: column;
        gap: 2px;
    }

    .content {
        padding: 24px 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-header__avatar {
        width: 72px;
        height: 72px;
    }

    .profile-header__summary {
        justify-content: center;
    }

    .castings-content {
        padding: 20px 12px;
    }

    .castings-title {
        font-size: 1.375rem;
    }

    .match-group-cards .casting-card {
        flex: 0 0 260px;
    }

}

/* ── Workflow Section ── */

.workflow-section {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 24px 32px; /* reduced top padding — tighter to hero */
}

.workflow-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.workflow-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.workflow-card {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg);
    position: relative;
}

/* Horizontal connector line between cards (desktop only) */
.workflow-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 33px; /* vertically aligned with number circle center */
    right: -16px; /* spans the gap */
    width: 16px;
    height: 1px;
    background: var(--color-border);
}

/* Step 4 subtle emphasis */
.workflow-card--highlight {
    border-color: var(--color-text-secondary);
}

.workflow-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.workflow-card-title {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 6px;
}

.workflow-card-desc {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .workflow-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .workflow-card {
        display: grid;
        grid-template-columns: 28px 1fr;
        grid-template-rows: auto auto;
        column-gap: 14px;
        row-gap: 2px;
    }

    .workflow-card .workflow-number {
        margin-bottom: 0;
        grid-row: 1 / -1;
        align-self: center;
    }

    .workflow-card:not(:last-child)::after {
        display: none; /* hide horizontal connectors on mobile */
    }

    .workflow-section {
        padding: 20px 20px 24px;
    }
}
