.fn-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* Tabs */
.fn-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.fn-tabs::-webkit-scrollbar {
    height: 0;
}
.fn-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}
.fn-tab:hover {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.08);
}
.fn-tab.active {
    background: rgba(124, 58, 237, 0.18);
    color: #c4b5fd;
}
.fn-tab svg {
    flex-shrink: 0;
}
.fn-tab-pane {
    display: none;
}
.fn-tab-pane.active {
    display: block;
}

.fn-search-card {
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
}

.fn-my-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 8px 14px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.1);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.fn-my-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: #a78bfa;
}

.fn-period-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    padding: 10px 12px;
    background: rgba(124, 58, 237, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(167, 139, 250, 0.15);
}
.fn-period-hint strong {
    color: var(--text-secondary);
}

.fn-search-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.fn-logo-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #5b21b6, #7c3aed 40%, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
    border: 2px solid rgba(167, 139, 250, 0.35);
}

.fn-logo-f {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.fn-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.fn-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

.fn-banner {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.fn-banner-warn {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--text-secondary);
}

.fn-banner a {
    color: #a78bfa;
}

.fn-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fn-search-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.fn-input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
}

.fn-input:focus {
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.fn-search-btn {
    padding: 0 22px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    box-shadow: 0 2px 14px rgba(124, 58, 237, 0.35);
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.2s;
}

.fn-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
}

.fn-search-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.fn-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.fn-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fn-select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.fn-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 12px 0 0;
    line-height: 1.45;
}

.fn-hint code {
    background: rgba(124, 58, 237, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.fn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 36px;
    color: var(--text-secondary);
}

.fn-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(124, 58, 237, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: fnSpin 0.75s linear infinite;
}

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

.fn-error {
    padding: 16px 18px;
    margin-bottom: 16px;
    color: #f87171;
    font-size: 14px;
    line-height: 1.5;
}
.fn-privacy-hint {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
}
.fn-privacy-hint a {
    color: #a78bfa;
}

/* Suggestions */
.fn-suggestions {
    display: none;
    margin: -8px 0 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 15, 28, 0.96);
    max-height: 220px;
    overflow-y: auto;
}

.fn-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.fn-suggest-item:last-child {
    border-bottom: none;
}

.fn-suggest-item:hover {
    background: rgba(124, 58, 237, 0.1);
}

.fn-suggest-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.fn-suggest-del {
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
}

.fn-suggest-del:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Result */
.fn-profile-card {
    padding: 22px;
    margin-bottom: 16px;
}

.fn-profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.fn-avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    background: rgba(124, 58, 237, 0.15);
    border: 2px solid rgba(167, 139, 250, 0.35);
}

.fn-display-name {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #c4b5fd, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fn-account-id {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Space Mono', monospace;
    margin-top: 4px;
    word-break: break-all;
}

.fn-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.fn-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, 0.35);
}

.fn-stats-section {
    margin-top: 20px;
}

.fn-stats-section h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.fn-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.fn-stat-box {
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

.fn-stat-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
}

.fn-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fn-mode-block {
    margin-bottom: 20px;
}

.fn-mode-title {
    font-size: 15px;
    font-weight: 700;
    color: #a78bfa;
    margin: 0 0 10px;
}

/* Actions + share */
.fn-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}
.fn-tracker-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.fn-tracker-btn:hover {
    background: rgba(56, 189, 248, 0.2);
}
.fn-dl-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(167, 139, 250, 0.4);
    background: rgba(124, 58, 237, 0.15);
    color: #e9d5ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.fn-dl-btn:hover {
    background: rgba(124, 58, 237, 0.28);
}

.fn-share-card {
    padding: 18px;
    margin-top: 16px;
}
.fn-share-title {
    font-size: 15px;
    font-weight: 700;
    color: #a78bfa;
    margin: 0 0 12px;
}
.fn-embed-row {
    margin-bottom: 12px;
}
.fn-embed-row label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.fn-embed-input {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-size: 12px;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.fn-embed-ta {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-size: 11px;
    font-family: monospace;
    resize: vertical;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.fn-embed-copy {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    background: rgba(124, 58, 237, 0.12);
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* Compare */
.fn-compare-card {
    padding: 22px;
    margin-bottom: 16px;
}
.fn-compare-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    text-align: center;
    color: var(--text-primary);
}
.fn-compare-sub {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 18px;
}
.fn-compare-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    justify-content: center;
    margin-bottom: 14px;
}
.fn-compare-field {
    flex: 1;
    min-width: 140px;
    max-width: 280px;
}
.fn-compare-field .fn-input {
    width: 100%;
    box-sizing: border-box;
}
.fn-compare-vs {
    font-weight: 800;
    font-size: 14px;
    color: #a78bfa;
    padding: 0 4px 10px;
}
.fn-compare-filters {
    justify-content: center;
    margin-bottom: 16px;
}
.fn-compare-actions {
    text-align: center;
}
.fn-cmp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 8px;
}
@media (max-width: 640px) {
    .fn-cmp-grid {
        grid-template-columns: 1fr;
    }
}
.fn-cmp-col {
    padding: 18px;
}
.fn-cmp-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #c4b5fd;
    word-break: break-word;
}
.fn-cmp-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fn-cmp-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}
.fn-cmp-st-l {
    font-size: 12px;
    color: var(--text-muted);
}
.fn-cmp-st-v {
    font-size: 15px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--text-primary);
}

/* Shop */
.fn-shop-section {
    padding: 20px;
    margin-top: 20px;
}
.fn-shop-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text-primary);
}
.fn-shop-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.45;
}
.fn-shop-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-secondary);
}
.fn-shop-error {
    color: #f87171;
    font-size: 14px;
    padding: 8px 0;
    display: none;
}
.fn-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.fn-shop-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.fn-shop-img-wrap {
    aspect-ratio: 1;
    background: rgba(124, 58, 237, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fn-shop-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.fn-shop-img-ph {
    aspect-ratio: 1;
    background: rgba(124, 58, 237, 0.1);
}
.fn-shop-item-body {
    padding: 8px 10px 10px;
}
.fn-shop-item-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fn-shop-item-rarity {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}
.fn-shop-item-price {
    font-size: 11px;
    font-weight: 700;
    color: #a78bfa;
    margin-top: 6px;
}
