:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-main: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-sub: #6b7280;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --builder-bg: #f8fafc;
    --data-value-bg: #f9fafb;
    --avatar-bg-from: #f9fafb;
    --avatar-bg-to: #ffffff
}

html[data-theme="dark"] {
    --bg-main: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-sub: #94a3b8;
    --border: #334155;
    --builder-bg: #0f172a;
    --data-value-bg: #0f172a;
    --avatar-bg-from: #1e293b;
    --avatar-bg-to: #1e293b
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    margin: 0
}

.pm-hidden {
    display: none !important
}

.pm-show-block {
    display: block !important
}

.pm-show-flex {
    display: flex !important
}

.navbar {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    height: 4rem;
    background: var(--card-bg)
}

html[data-theme="dark"] .navbar.is-white {
    background: #1e293b !important;
    border-bottom: 1px solid #334155
}

.main-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem
}

.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border)
}

.avatar-section {
    background: linear-gradient(to bottom, var(--avatar-bg-from), var(--avatar-bg-to));
    border-bottom: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 0 0 4px #fff, var(--shadow);
    background: #e5e7eb;
    overflow: hidden
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.provider-badge,
.role-badge,
.sns-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .75rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid var(--border)
}

.provider-google {
    color: #ea4335;
    border-color: #fecaca;
    background: #fef2f2
}

.provider-github {
    color: #24292e;
    border-color: #d1d5db;
    background: #f3f4f6
}

.data-label {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem
}

.data-value {
    background: var(--data-value-bg);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-main)
}

.data-value--tall {
    min-height: 8rem;
    white-space: pre-wrap
}

.builder-grid {
    background: var(--builder-bg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem
}

.selectable-item {
    cursor: pointer;
    transition: all .2s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center
}

.selectable-item.is-selected {
    border-color: var(--primary);
    transform: scale(1.1)
}

.animal-option {
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    color: var(--text-main)
}

html[data-theme="dark"] .animal-option {
    background: #334155
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%
}

.btn-logout,
.btn-reset,
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .9rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    border: 1.5px solid;
    font-size: .8rem
}

.btn-logout {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #374151
}

.btn-reset {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #dc2626
}

.btn-action-share {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #86efac
}

.btn-action-copy {
    background: #fff7ed;
    color: #ea580c;
    border-color: #fdba74
}

.apple-toggle {
    position: relative;
    flex-shrink: 0;
    cursor: pointer
}

.apple-toggle-track {
    display: block;
    width: 44px;
    height: 26px;
    background: #e5e7eb;
    border-radius: 100px;
    transition: background .25s ease
}

.apple-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0
}

.apple-toggle input:checked+.apple-toggle-track {
    background: #34c759
}

.apple-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1)
}

.apple-toggle input:checked+.apple-toggle-track .apple-toggle-thumb {
    transform: translateX(18px)
}

.notification-panel {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    display: none;
    flex-direction: column;
    z-index: 9000
}

.notification-panel.is-open {
    display: flex
}

.pub-container {
    max-width: 560px;
    margin: 3rem auto;
    padding: 0 1.25rem
}

.pub-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: pub-fade-in .4s ease both
}

@keyframes pub-fade-in {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.pub-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    padding: 2.5rem 2rem 1.5rem;
    text-align: center
}

.pub-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .3), var(--shadow);
    background: #e5e7eb;
    overflow: hidden
}

.pub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.sns-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--data-value-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    min-height: 40px
}

@media (max-width:768px) {
    .main-container {
        margin: 1rem auto;
        padding: 0 1rem
    }

    .privacy-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .notification-panel {
        width: calc(100vw - 2rem);
        right: -1rem
    }
}