* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --ink: #f7fbff;
    --muted: #ffe8f1;
    --line: rgba(255, 214, 232, .24);
    --panel: rgba(43, 18, 38, .56);
    --blue: #8fd9ff;
    --mint: #a8ffe1;
    --pink: #ffd0e2;
    --rose: #ff84bc;
    --peach: #ffc09e;
    --danger: #ff6d91;
}

html {
    min-height: 100%;
    background: #17091b;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    letter-spacing: 0;
    background: #17091b;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.front-shell {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(255, 126, 183, .08), rgba(37, 13, 42, .24) 44%, rgba(24, 7, 28, .84) 86%),
        linear-gradient(135deg, rgba(255, 192, 158, .34), transparent 32%, rgba(143, 217, 255, .24) 76%, rgba(255, 132, 188, .18)),
        url("/assets/images/home-privacy-tech.png?v=20260613d") center top / cover no-repeat fixed;
}

.home-hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 30px 20px 116px;
    position: relative;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 132, 188, .18), transparent 35%, rgba(168, 255, 225, .1)),
        linear-gradient(180deg, transparent 0 62%, rgba(255, 132, 188, .12)),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 10px);
    mix-blend-mode: screen;
    opacity: .52;
    animation: scan 7s ease-in-out infinite alternate;
}

.home-copy {
    width: min(100%, 560px);
    position: relative;
    z-index: 1;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 208, 226, .28);
    margin-bottom: 18px;
    padding: 7px 11px;
    color: rgba(255, 247, 252, .92);
    background: rgba(65, 22, 56, .36);
    backdrop-filter: blur(14px);
    font-size: 13px;
    line-height: 1;
}

.brand-mark::before {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--rose), var(--mint));
}

.home-copy h1 {
    margin: 0;
    max-width: 14rem;
    font-size: clamp(29px, 8vw, 42px);
    line-height: 1.22;
    font-weight: 600;
    letter-spacing: 0;
    text-shadow: 0 14px 34px rgba(72, 12, 46, .7);
}

.home-copy p {
    margin: 16px 0 0;
    max-width: 23rem;
    color: rgba(255, 247, 252, .9);
    font-size: 14px;
    line-height: 1.9;
    text-shadow: 0 12px 30px rgba(59, 9, 42, .64);
}

.home-section {
    position: relative;
    overflow: hidden;
    padding: 70px 20px;
    background:
        linear-gradient(180deg, #19091f, #241230 46%, #120817);
    border-top: 1px solid var(--line);
}

.home-section::before {
    content: "";
    position: absolute;
    top: 18px;
    left: -18%;
    width: 136%;
    height: 120px;
    pointer-events: none;
    background:
        linear-gradient(110deg, transparent 0 19%, rgba(255, 132, 188, .22) 20% 21%, transparent 22% 44%, rgba(168, 255, 225, .16) 45% 46%, transparent 47% 100%),
        linear-gradient(180deg, rgba(255, 240, 248, .07), transparent);
    transform: rotate(-6deg);
}

.home-section h2,
.profile-head h1,
.album-head h1 {
    position: relative;
    margin: 0;
    font-size: 28px;
    font-weight: 500;
}

.home-section p {
    position: relative;
    margin: 16px 0 0;
    color: rgba(255, 232, 241, .82);
    line-height: 1.9;
}

.home-points {
    position: relative;
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.home-point {
    border: 1px solid rgba(255, 208, 226, .26);
    background:
        linear-gradient(135deg, rgba(255, 132, 188, .16), rgba(255, 255, 255, .055) 42%, rgba(143, 217, 255, .09));
    padding: 19px;
    backdrop-filter: blur(18px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .09),
        0 16px 38px rgba(255, 132, 188, .09);
}

.home-point strong {
    display: block;
    margin-bottom: 8px;
    color: #fff5fa;
    font-weight: 600;
}

.enter-button {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 20;
    height: 58px;
    border: 1px solid rgba(217, 232, 245, .38);
    color: #06101b;
    background: linear-gradient(135deg, #fff7fb, var(--pink) 30%, var(--peach) 58%, var(--mint));
    box-shadow: 0 18px 46px rgba(255, 132, 188, .28), 0 8px 24px rgba(143, 217, 255, .18);
    font-weight: 700;
    cursor: pointer;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: flex-end;
    background: rgba(0, 0, 0, .68);
    backdrop-filter: blur(18px);
}

.modal.is-open {
    display: flex;
}

.modal-panel {
    width: 100%;
    padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(9, 15, 25, .98), rgba(4, 9, 16, .96));
}

.modal-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.passcode-row {
    display: grid;
    grid-template-columns: 1fr 96px;
    gap: 10px;
    margin-top: 18px;
}

.passcode-row input {
    min-width: 0;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: rgba(255, 255, 255, .06);
    padding: 0 16px;
    font-size: 22px;
    letter-spacing: 4px;
}

.passcode-row button,
.ghost-button {
    border: 1px solid rgba(217, 232, 245, .32);
    color: var(--ink);
    background: rgba(255, 255, 255, .08);
}

.ghost-button {
    height: 44px;
    padding: 0 18px;
}

.form-error {
    min-height: 24px;
    margin: 10px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.content-shell {
    min-height: 100vh;
    padding: 26px 16px 44px;
    background:
        linear-gradient(120deg, rgba(255, 142, 189, .12), transparent 28%, rgba(123, 200, 255, .12) 76%, transparent),
        linear-gradient(180deg, #07101a, #02050a 70%);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.top-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border: 1px solid rgba(255, 199, 218, .18);
    padding: 0 13px;
    color: rgba(247, 251, 255, .78);
    background: rgba(255, 255, 255, .045);
    font-size: 14px;
}

.profile-head,
.album-head {
    margin-bottom: 28px;
}

.profile-head p {
    margin: 14px 0 0;
    color: rgba(247, 251, 255, .78);
    line-height: 1.85;
    white-space: pre-line;
}

.album-grid {
    display: grid;
    gap: 16px;
}

.album-card {
    display: block;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
}

.album-cover {
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, rgba(123, 200, 255, .16), rgba(255, 255, 255, .04));
    overflow: hidden;
}

.album-cover img,
.masonry img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-name {
    padding: 14px;
    color: var(--silver);
    font-weight: 600;
}

.masonry {
    columns: 2;
    column-gap: 10px;
}

.photo-tile {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    break-inside: avoid;
    border: 0;
    padding: 0;
    background: transparent;
}

.photo-tile img {
    height: auto;
    background: rgba(255, 255, 255, .04);
}

.load-state {
    padding: 22px 0 10px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

@media (min-width: 720px) {
    .front-shell {
        background-size: min(900px, 100%) auto;
    }

    .home-hero,
    .home-section,
    .content-shell {
        padding-left: calc((100vw - 640px) / 2);
        padding-right: calc((100vw - 640px) / 2);
    }

    .enter-button {
        left: 50%;
        right: auto;
        width: 380px;
        transform: translateX(-50%);
    }

    .album-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .masonry {
        columns: 3;
    }
}

@keyframes scan {
    from {
        opacity: .36;
        transform: translateY(-10px);
    }

    to {
        opacity: .66;
        transform: translateY(10px);
    }
}
