:root {
    --hub-bg: #0a0a0f;
    --hub-card: rgba(255, 255, 255, 0.025);
    --hub-border: rgba(255, 255, 255, 0.09);
    --hub-text: #f4f4f5;
    --hub-muted: rgba(255, 255, 255, 0.55);
    --hub-dim: rgba(255, 255, 255, 0.35);
    --hub-accent: #7c3aed;
    --hub-accent-soft: rgba(124, 58, 237, 0.14);
}

/* The shared footer sets `max-width:100%` alongside 24px of horizontal padding.
   Without border-box that overflows the viewport and the whole page gains a
   sideways scrollbar. */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--hub-bg);
    color: var(--hub-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hub-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

.hub-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.hub-head h1 {
    font-size: 1.5rem;
    margin: 0;
    letter-spacing: -0.02em;
}

.hub-head p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--hub-muted);
}

.hub-project-switch {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-project-switch img {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.hub-select {
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--hub-border);
    border-radius: 9px;
    color: var(--hub-text);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    min-width: 220px;
}

.hub-select:focus {
    border-color: var(--hub-accent);
}

.hub-body {
    display: grid;
    grid-template-columns: 216px 1fr;
    gap: 22px;
    align-items: start;
}

@media (max-width: 860px) {
    .hub-body {
        grid-template-columns: 1fr;
    }

    .hub-nav {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 6px;
    }

    .hub-nav button {
        white-space: nowrap;
    }
}

.hub-nav {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hub-nav button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--hub-muted);
    font-size: 0.83rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.hub-nav button:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--hub-text);
}

.hub-nav button.active {
    background: var(--hub-accent-soft);
    border-color: rgba(124, 58, 237, 0.35);
    color: #c4b5fd;
}

.hub-nav button svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.hub-nav .hub-lock {
    margin-left: auto;
    font-size: 0.62rem;
    color: var(--hub-dim);
}

.hub-section {
    display: none;
}

.hub-section.active {
    display: block;
}

.hub-card {
    background: var(--hub-card);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
}

.hub-card h2 {
    font-size: 1.02rem;
    margin: 0 0 4px;
}

.hub-card .hub-card-sub {
    font-size: 0.78rem;
    color: var(--hub-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

.hub-field {
    margin-bottom: 14px;
}

.hub-field:last-child {
    margin-bottom: 0;
}

.hub-field label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--hub-muted);
    margin-bottom: 6px;
}

.hub-field input[type="text"],
.hub-field input[type="url"],
.hub-field textarea,
.hub-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--hub-border);
    border-radius: 9px;
    color: var(--hub-text);
    font-size: 0.86rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
}

.hub-field input:focus,
.hub-field textarea:focus,
.hub-field select:focus {
    border-color: var(--hub-accent);
}

.hub-hint {
    font-size: 0.7rem;
    color: var(--hub-dim);
    margin-top: 5px;
    line-height: 1.45;
}

.hub-hint.warn {
    color: #fbbf24;
}

.hub-prefix {
    display: flex;
    align-items: stretch;
}

.hub-prefix span {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--hub-border);
    border-right: none;
    border-radius: 9px 0 0 9px;
    color: var(--hub-dim);
    font-size: 0.78rem;
    white-space: nowrap;
}

.hub-prefix input {
    border-radius: 0 9px 9px 0 !important;
}

.hub-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--hub-border);
    border-radius: 9px;
}

.hub-switch-row .hub-switch-text {
    font-size: 0.8rem;
    color: var(--hub-text);
}

.hub-switch-row .hub-switch-text small {
    display: block;
    font-size: 0.68rem;
    color: var(--hub-dim);
    margin-top: 2px;
}

.hub-switch {
    position: relative;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.hub-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hub-switch .hub-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.hub-switch .hub-slider:before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.hub-switch input:checked + .hub-slider {
    background: var(--hub-accent);
}

.hub-switch input:checked + .hub-slider:before {
    transform: translateX(18px);
}

.hub-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.hub-upload {
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}

.hub-upload:hover {
    border-color: rgba(124, 58, 237, 0.5);
}

.hub-upload-preview {
    height: 78px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
}

.hub-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hub-upload-name {
    font-size: 0.78rem;
    font-weight: 600;
}

.hub-upload-hint {
    font-size: 0.65rem;
    color: var(--hub-dim);
    margin-top: 2px;
}

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

.hub-chip {
    padding: 7px 13px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hub-border);
    border-radius: 999px;
    color: var(--hub-muted);
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.hub-chip:hover {
    border-color: rgba(124, 58, 237, 0.4);
    color: var(--hub-text);
}

.hub-chip.active {
    background: var(--hub-accent-soft);
    border-color: rgba(124, 58, 237, 0.5);
    color: #c4b5fd;
}

.hub-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.hub-row input[type="text"] {
    padding: 8px 11px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    color: var(--hub-text);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.hub-row > input[data-field="name"] {
    flex: 0 0 150px;
}

.hub-row .hub-prefix input {
    flex: 1;
    width: 100%;
}

.hub-row-remove {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #f87171;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.hub-row-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

.hub-subcard {
    border: 1px solid var(--hub-border);
    border-radius: 11px;
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.18);
}

.hub-subcard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.82rem;
}

.hub-subcard .hub-field input[type="text"],
.hub-subcard .hub-field textarea,
.hub-subcard .hub-field select,
.hub-subcard input[type="text"],
.hub-subcard textarea,
.hub-subcard select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    color: var(--hub-text);
    font-size: 0.84rem;
    font-family: inherit;
    outline: none;
}

.hub-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.hub-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 9px;
    background: var(--hub-accent);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}

.hub-btn:hover {
    opacity: 0.9;
}

.hub-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.hub-btn.ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-muted);
}

.hub-locked {
    text-align: center;
    padding: 30px 18px;
}

.hub-locked h3 {
    margin: 10px 0 6px;
    font-size: 1rem;
}

.hub-locked p {
    margin: 0 auto 16px;
    max-width: 430px;
    font-size: 0.8rem;
    color: var(--hub-muted);
    line-height: 1.6;
}

.hub-locked-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto;
    border-radius: 12px;
    background: var(--hub-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
}

.hub-promo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(20, 241, 149, 0.06));
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 14px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.hub-promo div {
    flex: 1;
    min-width: 220px;
}

.hub-promo strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 3px;
}

.hub-promo span {
    font-size: 0.75rem;
    color: var(--hub-muted);
    line-height: 1.5;
}

.hub-promo a {
    padding: 9px 16px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--hub-text);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.hub-promo a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hub-row-static {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid var(--hub-border);
    border-radius: 9px;
    margin-bottom: 7px;
    font-size: 0.82rem;
}

.hub-row-static small {
    display: block;
    margin-top: 2px;
}

.hub-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9998;
    padding: 20px;
    overflow-y: auto;
}

.hub-modal.open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.hub-modal-inner {
    background: #12121c;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 20px;
    width: 100%;
    max-width: 520px;
    margin-top: 8vh;
}

.hub-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.hub-modal-head h2 {
    margin: 0;
    font-size: 1.02rem;
}

.hub-modal-close {
    background: none;
    border: none;
    color: var(--hub-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.hub-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--hub-muted);
}

.hub-empty h2 {
    font-size: 1.1rem;
    color: var(--hub-text);
    margin-bottom: 8px;
}

.toast-container {
    position: fixed;
    bottom: 22px;
    right: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}

.toast {
    padding: 11px 16px;
    border-radius: 10px;
    background: rgba(20, 20, 28, 0.96);
    border: 1px solid var(--hub-border);
    color: var(--hub-text);
    font-size: 0.82rem;
    max-width: 340px;
    transition: opacity 0.3s;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.45);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.45);
}

.toast.info {
    border-color: rgba(124, 58, 237, 0.45);
}

/* Listing-state notice: why a collection the founder can see is not live yet.
   Pre-mint reservations sit here for days, so it has to read as a normal state
   rather than an error — informational blue, not a red banner. */
.hub-state {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: rgba(59, 130, 246, 0.08);
    color: var(--text, #e6e8ef);
    font-size: 0.9rem;
    line-height: 1.5;
}

.hub-state[data-tone="warn"] {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

.hub-state__icon { font-size: 1.1rem; line-height: 1.35; }
.hub-state__title { font-weight: 600; display: block; margin-bottom: 0.15rem; }
.hub-state__body { opacity: 0.85; }
