*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --hub-bg: #ffffff;
    --hub-surface: #fafafa;
    --hub-surface-2: #f3f3f5;
    --hub-border: rgba(10, 10, 10, 0.08);
    --hub-text: #0a0a0a;
    --hub-muted: rgba(10, 10, 10, 0.58);
    --hub-gold: #c9a227;
    --hub-gold-bright: #d4af37;
    --hub-gold-soft: rgba(212, 175, 55, 0.14);
    --hub-green: #1a9d5f;
    --hub-header-h: 56px;
    --hub-vv-bottom: 0px;
    --hub-max: 480px;
}

html.hub-embed,
html.hub-embed body {
    height: 100%;
    overflow: hidden;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--hub-bg);
    color: var(--hub-text);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.hub-app {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--hub-max);
    min-height: 100%;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--hub-bg);
}

.hub-app.is-embedded {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
}

.hub-header {
    flex-shrink: 0;
    z-index: 10;
    height: var(--hub-header-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.hub-header__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(212, 175, 55, 0.35);
}

.hub-header__meta {
    min-width: 0;
    flex: 1;
}

.hub-header__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-header__subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--hub-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-header__subtitle::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hub-gold-bright);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.45);
}

.hub-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.hub-panel {
    display: none;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    animation: hub-fade-in 0.22s ease;
    -webkit-overflow-scrolling: touch;
}

.hub-panel.is-active {
    display: block;
}

@keyframes hub-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-nav {
    flex-shrink: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px) + var(--hub-vv-bottom));
    border-top: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

.hub-nav__item {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--hub-muted);
    font: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    cursor: pointer;
    position: relative;
    transition: color 0.18s ease;
}

.hub-nav__item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    border-radius: 999px;
    background: var(--hub-gold-bright);
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.hub-nav__item.is-active {
    color: var(--hub-gold-bright);
}

.hub-nav__item.is-active::before {
    opacity: 1;
    transform: scaleX(1);
}

.hub-nav__icon {
    width: 22px;
    height: 22px;
}

.hub-nav__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-align: center;
}

.hub-pinned {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: linear-gradient(135deg, rgba(248, 212, 129, 0.22) 0%, #fffdf7 100%);
}

.hub-pinned__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-gold);
}

.hub-pinned__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(10, 10, 10, 0.88);
}

.hub-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hub-post {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
}

.hub-post__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #0f1117;
    background: linear-gradient(135deg, #f8d481 0%, #c9a227 100%);
}

.hub-post__bubble {
    padding: 10px 12px;
    border-radius: 4px 14px 14px 14px;
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
}

.hub-post__author {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-gold);
}

.hub-post__time {
    margin-left: 8px;
    font-size: 11px;
    font-weight: 400;
    color: var(--hub-muted);
}

.hub-post__body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(10, 10, 10, 0.9);
}

.hub-post__tag {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background: var(--hub-gold-soft);
    color: var(--hub-gold);
}

.hub-hero {
    text-align: center;
    padding: 8px 0 20px;
}

.hub-hero__cover {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
}

.hub-hero__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hub-hero__lead {
    margin: 0 auto 20px;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--hub-muted);
}

.hub-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.hub-stat {
    padding: 12px 8px;
    border-radius: 10px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    text-align: center;
}

.hub-stat__value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--hub-gold);
}

.hub-stat__label {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hub-muted);
}

.hub-cta {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8d481 0%, #d4af37 100%);
    color: #0a0a0a;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25);
}

.hub-cta:hover {
    filter: brightness(1.04);
}

.hub-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.hub-card__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.hub-card__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--hub-muted);
}

.hub-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    font-size: 14px;
    line-height: 1.45;
}

.hub-checklist li::before {
    content: "✓";
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--hub-gold);
    background: rgba(212, 175, 55, 0.12);
}

.hub-section-title {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hub-muted);
}

.hub-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.hub-field input,
.hub-field textarea,
.hub-field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--hub-border);
    background: #ffffff;
    color: var(--hub-text);
    font: inherit;
    font-size: 14px;
}

.hub-field input:focus,
.hub-field textarea:focus,
.hub-field select:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.45);
}

.hub-field textarea {
    min-height: 96px;
    resize: vertical;
}

.hub-form-note {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--hub-muted);
}

.hub-form-success {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(26, 157, 95, 0.25);
    background: rgba(26, 157, 95, 0.08);
    font-size: 13px;
    line-height: 1.45;
    color: rgba(10, 10, 10, 0.88);
}

.hub-form-success[hidden] {
    display: none;
}

.hub-nav--six {
    grid-template-columns: repeat(6, 1fr);
}

.hub-nav--six .hub-nav__label {
    font-size: 9px;
}

.hub-nav--six .hub-nav__icon {
    width: 20px;
    height: 20px;
}

.hub-center {
    text-align: center;
}

.hub-spaced {
    margin-bottom: 20px;
}

.hub-spaced-sm {
    margin-bottom: 12px;
}

.hub-card--free {
    border-color: rgba(10, 10, 10, 0.08);
}

.hub-card--premium {
    border-color: rgba(212, 175, 55, 0.22);
}

.hub-cheatsheet-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--hub-border);
    box-shadow: 0 8px 24px rgba(10, 10, 10, 0.08);
}

.hub-cheatsheet-caption {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--hub-muted);
    text-align: center;
}

.hub-chart-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hub-chart-item {
    border-radius: 12px;
    overflow: hidden;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
}

.hub-chart-item__image {
    display: block;
    width: 100%;
    height: auto;
}

.hub-chart-item__placeholder {
    padding: 48px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--hub-muted);
    background: var(--hub-surface-2);
}

.hub-chart-item__body {
    padding: 12px 14px;
}

.hub-chart-item__title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
}

.hub-chart-item__caption {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--hub-muted);
}

.hub-support-intro {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(10, 10, 10, 0.88);
}

.hub-support-email {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--hub-gold);
    text-decoration: none;
    word-break: break-all;
}

.hub-faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-faq__item {
    border-radius: 10px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    padding: 12px 14px;
}

.hub-faq__item summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
}

.hub-faq__item summary::-webkit-details-marker {
    display: none;
}

.hub-faq__item p {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--hub-muted);
}

.hub-form-success--error {
    border-color: rgba(223, 27, 65, 0.3);
    background: rgba(223, 27, 65, 0.08);
    color: #b42318;
}

.hub-indicator-cover {
    display: block;
    width: 120px;
    margin: 0 auto 16px;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(10, 10, 10, 0.1);
}
