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

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Work Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    --button-height: 1.5rem;
    --button-margin: 0.3rem;
    --icon-width: 2.5rem;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 13px;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (min-width: 640px) {
    .page {
        --button-height: 2rem;
        --button-margin: 0.5rem;
        --icon-width: 2.8rem;
        font-size: 16px;
    }
}

/* background-attachment: fixed tidak didukung baik di iOS */
@supports (-webkit-touch-callout: none) {
    .page { background-attachment: scroll; }
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 0.75rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Profile ---------- */
.profile {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0.5rem;
}

.profile-banner {
    width: calc(100% + 2.5rem);
    margin-top: -2rem;
    padding-bottom: 39.02439024390244%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, #000 70%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, #000 70%, transparent);
    mask-composite: intersect;
}

.profile-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    background: #fff;
}

.profile-avatar.has-banner { margin-top: -3rem; position: relative; }

@media (min-width: 640px) {
    .profile-avatar { width: 7rem; height: 7rem; }
    .profile-avatar.has-banner { margin-top: -3.5rem; }
}

.profile-title {
    margin: 0.75rem 0 0;
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 700;
    font-style: italic;
}

.profile-description {
    margin: 0.5rem 0 0.5rem;
    white-space: pre-line;
    font-weight: 700;
    font-style: italic;
    line-height: 1.5;
}

/* ---------- Divider & text ---------- */
.divider {
    width: calc(100% - 1rem);
    margin: 0.85rem 0.5rem;
    border: 0;
    border-top: 1px solid currentColor;
    opacity: 0.35;
}

.text-block {
    width: 100%;
    padding: 0.25rem 0.5rem 0.5rem;
    text-align: center;
    line-height: 1.5;
}

/* ---------- Buttons ---------- */
.item {
    width: 100%;
    margin: 0.5rem 0 1rem;
    position: relative;
    z-index: 10;
}

.btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: calc(var(--icon-width) + 0.6rem);
    padding: 0.3rem;
    border-radius: 9999px;
    background: var(--link-background);
    color: var(--link-color);
    box-shadow: 0 0.5rem 0 0 var(--link-shadow);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: box-shadow .15s ease, transform .15s ease;
}

.btn:hover,
.btn:focus-visible {
    box-shadow: 0 0 0 0 var(--link-shadow);
    transform: translateY(0.5rem);
}

.btn:focus-visible { outline: 2px solid var(--link-shadow); outline-offset: 3px; }

summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

.btn-icon {
    flex: none;
    width: var(--icon-width);
    height: var(--icon-width);
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon img { width: 100%; height: 100%; object-fit: cover; }
.btn-icon-emoji { font-size: calc(var(--icon-width) * 0.55); line-height: 1; }
.btn-icon-svg { width: 55%; height: 55%; }
.btn-spacer { visibility: hidden; }

.btn-text {
    flex: 1;
    min-width: 0;
    padding: 0.5rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chevron { width: 1.25rem; height: 1.25rem; transition: transform .2s ease; }
.spoiler[open] .chevron { transform: rotate(180deg); }

/* ---------- Spoiler panel ---------- */
.spoiler-panel {
    margin: 1rem 0.25rem 0;
    background: #fff;
    color: #111827;
    border-radius: 0.5rem;
    overflow: hidden;
    animation: spoiler-in .2s ease;
}

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

.slider { position: relative; }

.slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }

.slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}
.slide img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; }

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.slider-nav.prev { left: 0.5rem; }
.slider-nav.next { right: 0.5rem; }

.slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.6rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}
.slider-dots button {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .6);
    cursor: pointer;
}
.slider-dots button.active { background: #fff; width: 1.25rem; }

.map { display: block; width: 100%; height: 260px; border: 0; }

.map-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem 1rem;
    font-size: 0.875em;
    text-align: left;
}
.map-info a { color: #2563eb; font-weight: 600; text-decoration: none; }

/* ---------- Social ---------- */
.social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem 0 0.5rem;
}

.social-link {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--link-background);
    color: var(--link-color);
    transition: transform .15s ease;
}
.social-link:hover { transform: translateY(-2px); }
.social-svg { width: 1.25rem; height: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
    .btn, .chevron, .social-link, .spoiler-panel { transition: none; animation: none; }
}
