/* ===== Investor Profile ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    min-height: 100vh;
}

.ip-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 16px 40px;
}

/* Toast */
.ip-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    animation: ipToastIn .5s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-toast-ai {
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #065f46;
}

@keyframes ipToastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Card */
.ip-card {
    background: rgba(25, 25, 35, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    position: relative;
}

.ip-card-layout {
    display: block; /* Removed sidebar grid layout */
}

.ip-card-main {
    flex: 1;
    min-width: 0;
}

/* Hero Row */
.ip-hero-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    margin-bottom: 12px;
}

.ip-hero-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: #161628;
    margin-top: 2px;
}

.ip-hero-text {
    flex: 1;
    min-width: 0;
}

.ip-hero-name {
    font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 2px;
}

.ip-hero-company-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0;
}

.ip-hero-company {
    font-size: 14px;
    color: #d4a84a;
    font-weight: 600;
}

.ip-hero-title {
    font-size: 13px;
    color: #aaa;
}

.ip-hero-sub {
    font-size: 12px;
    color: #777;
}

.ip-cat-badge {
    font-size: 11px;
    padding: 2px 10px;
    background: rgba(212, 168, 74, 0.12);
    color: #d4a84a;
    border-radius: 20px;
    font-weight: 600;
}

.ip-hero-name-tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.ip-hero-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ip-htag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #bbb;
    border-radius: 6px;
}

/* Bio */
.ip-bio-section {
    margin-left: 78px;
    position: relative;
    margin-bottom: 10px;
}

.ip-bio-inline {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
}

.ip-bio-empty {
    padding: 12px 0;
}

.ip-empty-hint {
    color: #555;
    font-size: 13px;
    font-style: italic;
}

/* AI Progress */
.ip-ai-progress {
    margin: 16px 0;
    padding: 16px;
    background: rgba(6, 78, 59, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(110, 231, 183, 0.15);
}

.ip-ai-progress-steps {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ip-ai-step {
    font-size: 12px;
    color: #555;
    transition: color .3s;
}

.ip-ai-step.active {
    color: #6ee7b7;
}

.ip-ai-step.done {
    color: #999;
}

.ip-ai-step-icon {
    margin-right: 4px;
}

.ip-ai-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.ip-ai-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6ee7b7, #34d399);
    transition: width .5s ease;
    border-radius: 2px;
}

/* Divider */
.ip-divider {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    margin-left: 78px;
    position: relative;
}

.ip-divider-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6a6a6a;
    font-weight: 700;
    white-space: nowrap;
}

.ip-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

/* Survey Tags */
.ip-survey-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 78px;
    margin-bottom: 24px;
}

.ip-survey-tag {
    background: rgba(212, 168, 74, 0.08);
    color: #e0e0e0;
    border: 1px solid rgba(212, 168, 74, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all .2s;
}

.ip-survey-tag:hover {
    background: rgba(212, 168, 74, 0.15);
    border-color: rgba(212, 168, 74, 0.5);
    color: #fff;
}

/* Investment Grid */
.ip-inv-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-left: 78px;
}

.ip-inv-info-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.ip-inv-info-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ip-inv-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
}

/* Portfolio */
.ip-portfolio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 78px;
    padding: 4px 0 8px;
}

.ip-pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 13px;
    color: #ddd;
    transition: all .2s;
}

.ip-pf-chip:hover {
    background: rgba(212, 168, 74, 0.1);
    border-color: rgba(212, 168, 74, 0.3);
}

.ip-pf-icon {
    font-size: 14px;
}

.ip-pf-cat {
    font-size: 10px;
    color: #888;
    margin-left: 4px;
}

.ip-pf-empty {
    padding: 8px 0;
}

/* Portfolio Editor */
.ip-pf-editor {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
}

.ip-pf-editor-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ip-pf-editor-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.ip-pf-editor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 13px;
}

.ip-pf-add-btn {
    background: rgba(212, 168, 74, 0.15);
    color: #d4a84a;
    border: 1px solid rgba(212, 168, 74, 0.3);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}

.ip-pf-add-btn:hover {
    background: rgba(212, 168, 74, 0.25);
}

.ip-pf-remove-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    transition: color .2s;
}

.ip-pf-remove-btn:hover {
    color: #ff4d4f;
}

/* Sidebar */
.ip-sidebar {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
}

.ip-sb-btn {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ip-sb-primary {
    background: linear-gradient(135deg, #d4a84a 0%, #b8892e 100%);
    color: #111;
}

.ip-sb-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ip-sb-share {
    font-size: 12px;
    text-align: center;
    color: #888;
    cursor: pointer;
    transition: color .2s;
    text-decoration: none;
    display: block;
}

.ip-sb-share:hover {
    color: #d4a84a;
}

.ip-sb-sns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}

.ip-sns-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #bbb;
    transition: all .2s;
    text-decoration: none;
}

.ip-sns-icon:hover {
    background: rgba(212, 168, 74, 0.15);
    color: #d4a84a;
}

.ip-sns-icon.off {
    opacity: 0.3;
    pointer-events: none;
}

/* Edit Buttons */
.ip-section-edit-btn {
    position: absolute;
    top: 8px;
    right: 0;
    background: rgba(212, 168, 74, 0.1);
    color: #d4a84a;
    border: 1px solid rgba(212, 168, 74, 0.25);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: none;
    align-items: center;
    gap: 4px;
}

.ip-section-edit-btn:hover {
    background: rgba(212, 168, 74, 0.2);
}

.ip-divider .ip-section-edit-btn {
    position: static;
}

/* Inline Edit */
.ip-inline-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 168, 74, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

.ip-inline-input:focus {
    border-color: #d4a84a;
}

.ip-inline-textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 168, 74, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: border-color .2s;
}

.ip-inline-textarea:focus {
    border-color: #d4a84a;
}

.ip-edit-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ip-edit-save-btn {
    background: linear-gradient(135deg, #d4a84a 0%, #b8892e 100%);
    color: #111;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.ip-edit-save-btn:hover {
    filter: brightness(1.1);
}

.ip-edit-cancel-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}

.ip-edit-cancel-btn:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

/* Modal */
.ip-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.ip-modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 460px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ip-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ip-modal-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    color: #fff;
}

.ip-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    transition: color .2s;
}

.ip-modal-close:hover {
    color: #ff4d4f;
}

.ip-modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ip-modal-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.ip-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

/* Footer */
.ip-footer {
    margin-top: 24px;
    text-align: center;
    padding: 16px 0;
}

.ip-footer a {
    color: #888;
    text-decoration: none;
}

.ip-footer-meta {
    font-size: 11px;
    color: #555;
    margin-bottom: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .ip-container {
        margin: 0 auto;
        padding: 80px 12px 24px;
    }

    .ip-card {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .ip-card-layout {
        display: block;
    }

    .ip-sidebar {
        margin-top: 16px;
    }

    .ip-bio-section {
        margin-left: 0;
    }

    .ip-divider {
        margin-left: 0;
    }

    .ip-survey-tags {
        margin-left: 0;
    }

    .ip-inv-info-grid {
        margin-left: 0;
        grid-template-columns: 1fr 1fr;
    }

    .ip-portfolio-row {
        margin-left: 0;
    }

    .ip-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ip-sb-btn {
        flex: 1;
        min-width: 140px;
    }

    .ip-sb-share {
        order: 3;
    }

    .ip-sb-sns {
        order: 4;
        width: 100%;
    }

    .ip-hero-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ip-hero-photo {
        width: 60px;
        height: 60px;
    }

    .ip-hero-name {
        font-size: 20px;
    }

    .ip-inv-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ip-inv-info-item {
        padding: 12px;
    }

    .ip-pf-editor-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ip-hero-row {
        gap: 10px;
    }

    .ip-hero-photo {
        width: 50px;
        height: 50px;
    }

    .ip-hero-name {
        font-size: 18px;
    }

    .ip-hero-company-line {
        gap: 4px;
    }

    .ip-inv-info-grid {
        grid-template-columns: 1fr;
    }

    .ip-sidebar {
        flex-direction: column;
    }

    .ip-sb-btn {
        min-width: auto;
    }
}