:root {
    --ui-bg: #f4f7fb;
    --ui-bg-soft: #edf3fb;
    --ui-surface: rgba(255, 255, 255, 0.92);
    --ui-surface-solid: #ffffff;
    --ui-border: #d9e4f2;
    --ui-border-strong: #bfd1ea;
    --ui-text: #0f172a;
    --ui-text-soft: #526179;
    --ui-text-muted: #74839b;
    --ui-blue: #1769ff;
    --ui-blue-strong: #0d57dc;
    --ui-orange: #ff5a00;
    --ui-orange-strong: #e24d00;
    --ui-green: #16a34a;
    --ui-red: #e11d48;
    --ui-gold: #d97706;
    --ui-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
    --ui-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
    --ui-radius-xl: 32px;
    --ui-radius-lg: 24px;
    --ui-radius-md: 18px;
    --ui-radius-sm: 14px;
}

body.app-auth,
body.app-market,
body.app-studio {
    margin: 0;
    min-height: 100vh;
    font-family: "Trebuchet MS", "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--ui-text);
    background:
        radial-gradient(circle at top left, rgba(255, 90, 0, 0.16), transparent 30%),
        radial-gradient(circle at top right, rgba(23, 105, 255, 0.12), transparent 28%),
        linear-gradient(180deg, var(--ui-bg) 0%, var(--ui-bg-soft) 100%);
}

body.app-auth *,
body.app-market *,
body.app-studio * {
    box-sizing: border-box;
}

body.app-auth a,
body.app-market a,
body.app-studio a {
    text-decoration: none;
}

.ui-btn,
body.app-auth .btn,
body.app-market .btn,
body.app-studio .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 16px;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.ui-btn:hover,
body.app-auth .btn:hover,
body.app-market .btn:hover,
body.app-studio .btn:hover {
    transform: translateY(-1px);
}

.ui-btn-primary,
body.app-auth .btn,
body.app-auth .btn-primary,
body.app-market .btn-primary,
body.app-studio .btn-primary {
    background: linear-gradient(135deg, var(--ui-orange) 0%, #ff7a1f 100%);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(255, 90, 0, 0.25);
}

.ui-btn-primary:hover,
body.app-auth .btn:hover,
body.app-auth .btn-primary:hover,
body.app-market .btn-primary:hover,
body.app-studio .btn-primary:hover {
    background: linear-gradient(135deg, var(--ui-orange-strong) 0%, #ff6b11 100%);
    box-shadow: 0 18px 34px rgba(255, 90, 0, 0.3);
}

.ui-btn-secondary,
body.app-market .btn-secondary,
body.app-studio .btn-secondary {
    background: #ffffff;
    color: var(--ui-blue);
    border: 1px solid var(--ui-border-strong);
    box-shadow: none;
}

.ui-btn-secondary:hover,
body.app-market .btn-secondary:hover,
body.app-studio .btn-secondary:hover {
    background: #f5f9ff;
    color: var(--ui-blue-strong);
    border-color: #a7c3ef;
}

body.app-studio .btn-danger {
    background: #fff1f2;
    color: var(--ui-red);
    border: 1px solid #fecdd3;
    box-shadow: none;
}

body.app-studio .btn-small,
body.app-market .btn-small {
    min-height: 42px;
    padding: 0 18px;
    font-size: 0.88rem;
}

.app-auth .skip-to-content,
.app-market .skip-to-content,
.app-studio .skip-to-content {
    position: absolute;
    left: 20px;
    top: -60px;
    z-index: 10000;
    padding: 10px 14px;
    background: var(--ui-blue);
    color: #fff;
    border-radius: 12px;
}

.app-auth .skip-to-content:focus,
.app-market .skip-to-content:focus,
.app-studio .skip-to-content:focus {
    top: 20px;
}

.app-auth .auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(360px, 0.9fr);
    min-height: 100vh;
    padding: 32px;
    gap: 28px;
}

.app-auth .auth-showcase,
.app-auth .auth-form-card {
    background: var(--ui-surface);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--ui-shadow);
}

.app-auth .auth-showcase {
    border-radius: var(--ui-radius-xl);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.app-auth .auth-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
        radial-gradient(circle at top right, rgba(23, 105, 255, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(255, 90, 0, 0.18), transparent 32%);
    pointer-events: none;
}

.app-auth .auth-brand,
.app-studio .studio-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.app-auth .brand-mark,
.app-market .brand-mark,
.app-studio .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ui-orange), #ff8b3d);
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(255, 90, 0, 0.24);
}

.app-auth .auth-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    color: var(--ui-blue);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.app-auth .auth-headline {
    position: relative;
    z-index: 1;
    margin: 26px 0 16px;
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ui-text) 0%, var(--ui-text-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-auth .auth-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
    color: var(--ui-text-soft);
    font-size: 1.08rem;
    line-height: 1.7;
}

.app-auth .auth-metric-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.app-auth .auth-metric {
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(219, 228, 242, 0.9);
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.app-auth .auth-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.1);
}

.app-auth .auth-metric strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.6rem;
}

.app-auth .auth-metric span {
    color: var(--ui-text-soft);
    font-size: 0.9rem;
}

.app-auth .auth-quote {
    position: relative;
    z-index: 1;
    margin-top: 36px;
    padding: 22px 24px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fbff;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.16);
}

.app-auth .auth-quote p {
    margin: 0 0 12px;
    line-height: 1.7;
}

.app-auth .auth-quote small {
    color: #b9c7dc;
}

.app-auth .auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-auth .auth-form-card {
    width: 100%;
    max-width: 540px;
    border-radius: var(--ui-radius-xl);
    padding: 36px;
}

.app-auth .auth-header {
    margin-bottom: 28px;
    text-align: left;
}

.app-auth .auth-header h1 {
    margin: 0 0 8px;
    font-size: 2rem;
    color: var(--ui-text);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.app-auth .auth-header p {
    margin: 0;
    color: var(--ui-text-soft);
    line-height: 1.6;
}

.app-auth .auth-surface-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.app-auth .btn-social {
    justify-content: center;
    padding: 0 18px;
    min-height: 50px;
    background: #fff;
    color: var(--ui-text);
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    font-weight: 700;
}

.app-auth .btn-social:hover {
    background: #f8fbff;
    border-color: var(--ui-border-strong);
}

.app-auth .auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--ui-text-muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.app-auth .auth-divider::before,
.app-auth .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ui-border);
}

.app-auth .alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    font-weight: 600;
}

.app-auth .alert-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: var(--ui-red);
}

.app-auth .alert-success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: var(--ui-green);
}

.app-auth .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.app-auth .form-group {
    margin-bottom: 18px;
}

.app-auth .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--ui-text-soft);
    font-size: 0.88rem;
    font-weight: 800;
}

.app-auth .input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 16px;
    background: #f9fbff;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.app-auth .input-wrapper:focus-within {
    background: #fff;
    border-color: #a9c8f5;
    box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
}

.app-auth .input-icon {
    color: var(--ui-text-muted);
}

.app-auth .input-wrapper input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent !important;
    color: var(--ui-text);
    font-size: 0.98rem;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
}

.app-auth .input-wrapper input::placeholder {
    color: #98a6bc;
}

.app-auth .password-toggle {
    border: 0;
    background: transparent;
    color: var(--ui-text-muted);
    cursor: pointer;
}

.app-auth .form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.app-auth .custom-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.app-auth .checkbox-box {
    width: 20px;
    height: 20px;
    border-radius: 8px;
    border: 1px solid var(--ui-border-strong);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.app-auth .custom-checkbox input:checked + .checkbox-box {
    background: var(--ui-blue);
    border-color: var(--ui-blue);
}

.app-auth .custom-checkbox input:checked + .checkbox-box i {
    display: inline-block;
}

.app-auth .checkbox-box i {
    display: none;
    font-size: 0.72rem;
}

.app-auth .forgot-link,
.app-auth .links a,
.app-auth .terms-link {
    color: var(--ui-blue) !important;
    font-weight: 700 !important;
}

.app-auth .forgot-link:hover,
.app-auth .links a:hover,
.app-auth .terms-link:hover {
    color: var(--ui-blue-strong) !important;
}

.app-auth .terms-links {
    font-size: 0.85rem;
    color: var(--ui-text-muted);
    line-height: 1.5;
}

.app-auth .terms-links a {
    color: var(--ui-blue) !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

.app-auth .terms-links a:hover {
    color: var(--ui-blue-strong) !important;
}

.app-auth .radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 6px;
    background: #f7faff;
    border: 1px solid var(--ui-border);
    border-radius: 20px;
}

.app-auth .radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 16px;
    color: var(--ui-text-soft);
    background: transparent;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.app-auth .radio-label.active {
    background: #ffffff;
    color: var(--ui-text);
    box-shadow: var(--ui-shadow-soft);
}

.app-auth .field-feedback,
.app-auth .password-strength {
    min-height: 18px;
    margin-top: 8px;
    color: var(--ui-text-muted);
    font-size: 0.8rem;
}

.app-auth .links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--ui-border);
    color: var(--ui-text-soft);
    text-align: center;
}

.app-market .market-shell {
    padding: 24px;
}

.app-market .market-topbar {
    position: sticky;
    top: 16px;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(240px, 420px) 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    box-shadow: var(--ui-shadow-soft);
}

.app-market .market-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ui-text);
    font-size: 1.08rem;
    font-weight: 900;
}

.app-market .market-search-mini form,
.app-market .market-hero-search form {
    position: relative;
}

.app-market .market-search-mini input,
.app-market .market-hero-search input,
.app-market .market-sort-select {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    background: #fff;
    color: var(--ui-text);
    font-size: 0.96rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-market .market-search-mini input:focus,
.app-market .market-hero-search input:focus,
.app-market .market-sort-select:focus {
    border-color: #a7c3ef;
    box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
}

.app-market .market-search-mini button,
.app-market .market-hero-search button {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 0;
    background: linear-gradient(135deg, var(--ui-orange), #ff7a1f);
    color: #fff;
    cursor: pointer;
}

.app-market .market-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-market .market-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    color: var(--ui-text-soft);
    font-weight: 700;
}

.app-market .market-nav-link:hover {
    background: #f5f9ff;
    color: var(--ui-blue);
}

.app-market .market-user-slot {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-market .market-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 18px 0 8px;
    background: #fff;
    color: var(--ui-text);
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    font-weight: 800;
    box-shadow: var(--ui-shadow-soft);
}

.app-market .market-user-pill:hover {
    border-color: var(--ui-border-strong);
}

.app-market .market-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ui-blue), #4c93ff);
    color: #fff;
    font-weight: 800;
}

.app-market .market-dropdown {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.app-market .market-dropdown a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--ui-text-soft);
    border: 1px solid var(--ui-border);
    font-size: 0.88rem;
    font-weight: 700;
}

.app-market .market-dropdown a:hover {
    color: var(--ui-blue);
    background: #fff;
}

.app-market .market-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 24px;
    margin-bottom: 24px;
}

.app-market .market-hero-panel,
.app-market .market-hero-aside,
.app-market .market-toolbar,
.app-market .market-featured-strip,
.app-market .market-empty,
.app-market .market-card,
.app-studio .studio-surface,
.app-studio .studio-stat-card,
.app-studio .studio-project-card,
.app-studio .studio-offer-card,
.app-studio .studio-welcome-card,
.app-studio .studio-publish-card,
.app-studio .studio-modal-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--ui-shadow);
}

.app-market .market-hero-panel {
    padding: 34px;
    border-radius: var(--ui-radius-xl);
}

.app-market .market-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff2ea;
    color: var(--ui-orange);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-market .market-hero h1 {
    margin: 20px 0 14px;
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
}

.app-market .market-hero p {
    margin: 0 0 22px;
    max-width: 720px;
    color: var(--ui-text-soft);
    font-size: 1.04rem;
    line-height: 1.7;
}

.app-market .market-hero-search {
    max-width: 720px;
}

.app-market .market-hero-search input {
    min-height: 64px;
    padding-right: 68px;
    border-radius: 22px;
    font-size: 1rem;
    box-shadow: var(--ui-shadow-soft);
}

.app-market .market-hero-search button {
    top: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.app-market .market-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.app-market .market-stat {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--ui-border);
}

.app-market .market-stat strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.6rem;
}

.app-market .market-stat span {
    color: var(--ui-text-soft);
    font-size: 0.9rem;
}

.app-market .market-hero-aside {
    border-radius: var(--ui-radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-market .market-spotlight-card {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f172a 0%, #1f2e47 100%);
    color: #fff;
}

.app-market .market-spotlight-card span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a9c7ff;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.app-market .market-spotlight-card h3 {
    margin: 16px 0 8px;
    font-size: 1.4rem;
}

.app-market .market-spotlight-card p {
    margin: 0;
    color: #d5e0f2;
    line-height: 1.6;
}

.app-market .market-mini-list {
    display: grid;
    gap: 12px;
}

.app-market .market-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
}

.app-market .market-mini-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.96rem;
}

.app-market .market-mini-item span {
    color: var(--ui-text-muted);
    font-size: 0.84rem;
}

.app-market .market-mini-score {
    min-width: 52px;
    height: 52px;
    padding: 0 12px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f9ff;
    color: var(--ui-blue);
    font-weight: 900;
}

.app-market .market-featured-strip {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 30px;
}

.app-market .market-section-head,
.app-studio .studio-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.app-market .market-section-head h2,
.app-studio .studio-section-head h2 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

.app-market .market-section-head p,
.app-studio .studio-section-head p {
    margin: 6px 0 0;
    color: var(--ui-text-soft);
}

.app-market .market-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.app-market .market-featured-card {
    min-height: 200px;
    padding: 22px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
        linear-gradient(135deg, #1769ff 0%, #0f172a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.app-market .market-featured-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.app-market .market-featured-card h3 {
    margin: 20px 0 10px;
    font-size: 1.4rem;
}

.app-market .market-featured-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.6;
}

.app-market .market-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding: 18px 20px;
    border-radius: 24px;
}

.app-market .market-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.app-market .market-chip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--ui-text-soft);
    border: 1px solid var(--ui-border);
    font-size: 0.88rem;
    font-weight: 800;
}

.app-market .market-chip:hover {
    color: var(--ui-blue);
    border-color: var(--ui-border-strong);
}

.app-market .market-chip.active {
    background: linear-gradient(135deg, #fff1eb, #ffe5d6);
    color: var(--ui-orange);
    border-color: #ffc29e;
}

.app-market .market-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.app-market .market-results {
    color: var(--ui-text-soft);
    font-size: 0.92rem;
    font-weight: 700;
}

.app-market .market-sort {
    min-width: 210px;
}

.app-market .market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.app-market .market-card {
    padding: 16px;
    border-radius: 26px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.app-market .market-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(23, 105, 255, 0.14);
}

.app-market .market-card-media {
    position: relative;
    height: 200px;
    margin-bottom: 16px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f0ff, #f9fbff);
    border: 1px solid #edf3fb;
}

.app-market .market-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-market .market-card-placeholder {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-blue);
    font-size: 2rem;
}

.app-market .market-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 243, 236, 0.95);
    color: var(--ui-orange);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-market .market-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.app-market .market-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f5f9ff;
    color: var(--ui-text-soft);
    border: 1px solid var(--ui-border);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.app-market .market-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ui-gold);
    font-weight: 900;
}

.app-market .market-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.28;
}

.app-market .market-card p {
    margin: 0 0 16px;
    color: var(--ui-text-soft);
    line-height: 1.6;
}

.app-market .market-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--ui-border);
}

.app-market .market-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-market .market-author span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ui-text-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.app-market .market-downloads {
    color: var(--ui-text-muted);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.app-market .market-empty {
    padding: 48px 24px;
    border-radius: 28px;
    text-align: center;
}

.app-market .market-empty i {
    display: inline-flex;
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 22px;
    background: #f5f9ff;
    color: var(--ui-blue);
    font-size: 1.8rem;
}

.app-market .market-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.app-market .market-pagination a,
.app-market .market-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--ui-border);
    color: var(--ui-text-soft);
    font-weight: 800;
}

.app-market .market-pagination a.active {
    background: var(--ui-blue);
    border-color: var(--ui-blue);
    color: #fff;
}

.app-market .market-pagination .dots {
    background: transparent;
    border: 0;
}

.app-studio .studio-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 100vh;
}

.app-studio .studio-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-right: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.06);
    overflow-y: auto;
}

.app-studio .studio-brand {
    margin-bottom: 28px;
}

.app-studio .studio-brand-copy strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.app-studio .studio-brand-copy span {
    color: var(--ui-text-muted);
    font-size: 0.88rem;
}

.app-studio .studio-nav {
    display: grid;
    gap: 8px;
}

.app-studio .studio-nav-item,
.app-studio .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    color: var(--ui-text-soft);
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.app-studio .studio-nav-item:hover,
.app-studio .nav-item:hover {
    background: #f5f9ff;
    color: var(--ui-blue);
}

.app-studio .studio-nav-item.active,
.app-studio .nav-item.active {
    background: linear-gradient(135deg, var(--ui-blue), #4d92ff);
    color: #fff;
    box-shadow: 0 14px 30px rgba(23, 105, 255, 0.24);
}

.app-studio .studio-nav-foot {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ui-border);
}

.app-studio .studio-flash {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 0.88rem;
    font-weight: 700;
}

.app-studio .studio-flash-error {
    background: #fff1f2;
    color: var(--ui-red);
    border: 1px solid #fecdd3;
}

.app-studio .studio-flash-success {
    background: #ecfdf3;
    color: var(--ui-green);
    border: 1px solid #bbf7d0;
}

.app-studio .studio-main-wrap {
    min-width: 0;
    padding: 24px;
}

.app-studio .studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 26px;
    box-shadow: var(--ui-shadow-soft);
}

.app-studio .studio-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-studio .studio-menu-toggle {
    width: 46px;
    height: 46px;
    padding: 0;
    background: #fff;
    color: var(--ui-blue);
    border: 1px solid var(--ui-border);
    box-shadow: none;
}

.app-studio .studio-header h1,
.app-studio .studio-header h3 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: -0.04em;
}

.app-studio .studio-header-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-studio .studio-status {
    color: var(--ui-text-muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.app-studio .studio-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px 0 8px;
    background: #fff;
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    box-shadow: var(--ui-shadow-soft);
}

.app-studio .studio-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ui-orange), #ff8740);
    color: #fff;
    font-weight: 900;
}

.app-studio .studio-main {
    min-width: 0;
}

.app-studio .studio-section,
.app-studio .studio-welcome-card {
    padding: 26px;
    border-radius: 30px;
}

.app-studio .studio-surface {
    padding: 26px;
    border-radius: 30px;
}

.app-studio .studio-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.app-studio .studio-stat-card {
    padding: 20px 22px;
    border-radius: 24px;
}

.app-studio .studio-stat-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.9rem;
}

.app-studio .studio-stat-card span {
    color: var(--ui-text-soft);
    font-size: 0.92rem;
}

.app-studio .studio-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.app-studio .studio-project-card,
.app-studio .studio-publish-card,
.app-studio .studio-offer-card {
    padding: 22px;
    border-radius: 26px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.app-studio .studio-project-card:hover,
.app-studio .studio-publish-card:hover,
.app-studio .studio-offer-card:hover {
    transform: translateY(-4px);
}

.app-studio .studio-project-head,
.app-studio .studio-offer-head,
.app-studio .studio-publish-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.app-studio .studio-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #fff3ec);
    color: var(--ui-blue);
    border: 1px solid var(--ui-border);
    font-size: 1.2rem;
}

.app-studio .studio-card-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.app-studio .studio-card-copy {
    margin: 0 0 16px;
    color: var(--ui-text-soft);
    line-height: 1.65;
}

.app-studio .studio-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--ui-border);
}

.app-studio .studio-inline-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--ui-text-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.app-studio .studio-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f5f9ff;
    color: var(--ui-blue);
    border: 1px solid var(--ui-border);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-studio .studio-empty {
    padding: 48px 24px;
    border-radius: 28px;
    text-align: center;
    color: var(--ui-text-soft);
}

.app-studio .studio-empty i {
    display: inline-flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 22px;
    background: #f5f9ff;
    color: var(--ui-blue);
    font-size: 1.9rem;
}

.app-studio .studio-message-thread {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--ui-border);
    display: grid;
    gap: 12px;
}

.app-studio .studio-message {
    padding: 14px 16px;
    background: #f9fbff;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
}

.app-studio .studio-message-meta {
    margin-bottom: 8px;
    color: var(--ui-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.app-studio .studio-form-stack {
    display: grid;
    gap: 14px;
}

.app-studio .studio-input,
.app-studio .studio-textarea,
.app-studio .studio-select,
.app-studio .form-group input,
.app-studio .form-group textarea,
.app-studio .form-group select {
    width: 100%;
    min-height: 50px;
    padding: 14px 16px;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    background: #fff;
    color: var(--ui-text);
    font-size: 0.96rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-studio .studio-textarea,
.app-studio .form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.app-studio .studio-input:focus,
.app-studio .studio-textarea:focus,
.app-studio .studio-select:focus,
.app-studio .form-group input:focus,
.app-studio .form-group textarea:focus,
.app-studio .form-group select:focus {
    border-color: #a7c3ef;
    box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
}

.app-studio .studio-modal-open {
    display: none;
}

.app-studio .studio-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10000;
}

.app-studio .studio-modal.show,
.app-studio .studio-modal[style*="flex"] {
    display: flex;
}

.app-studio .studio-modal-card {
    width: min(680px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 26px;
    border-radius: 30px;
}

.app-studio .studio-modal-card h3 {
    margin: 0 0 18px;
    font-size: 1.45rem;
    letter-spacing: -0.04em;
}

.app-studio .studio-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.app-studio .studio-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.app-studio .studio-field-note {
    color: var(--ui-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.app-studio .studio-inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.app-studio .studio-pill-success {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--ui-green);
    border: 1px solid #bbf7d0;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.app-studio .studio-pill-neutral {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--ui-text-soft);
    border: 1px solid var(--ui-border);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

@media (max-width: 1200px) {
    .app-auth .auth-shell,
    .app-market .market-hero,
    .app-market .market-featured-grid {
        grid-template-columns: 1fr;
    }

    .app-market .market-topbar {
        grid-template-columns: 1fr;
    }

    .app-studio .studio-shell {
        grid-template-columns: 1fr;
    }

    .app-studio .studio-sidebar {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.82);
    }
}

@media (max-width: 768px) {
    .app-auth .auth-shell,
    .app-market .market-shell,
    .app-studio .studio-main-wrap {
        padding: 16px;
    }

    .app-auth .auth-form-card,
    .app-auth .auth-showcase,
    .app-market .market-hero-panel,
    .app-market .market-hero-aside,
    .app-market .market-featured-strip,
    .app-market .market-toolbar,
    .app-studio .studio-header,
    .app-studio .studio-section,
    .app-studio .studio-surface,
    .app-studio .studio-welcome-card,
    .app-studio .studio-modal-card {
        padding: 20px;
        border-radius: 24px;
    }

    .app-auth .auth-metric-grid,
    .app-market .market-stats,
    .app-studio .studio-stat-grid,
    .app-studio .studio-two-col,
    .app-auth .form-row,
    .app-auth .auth-surface-row {
        grid-template-columns: 1fr;
    }

    .app-market .market-toolbar,
    .app-studio .studio-header,
    .app-auth .form-options,
    .app-studio .studio-section-head,
    .app-market .market-section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .app-market .market-grid,
    .app-studio .studio-card-grid {
        grid-template-columns: 1fr;
    }
}