:root {
    --white: #fff;
    --surface: #f5f5f7;
    --surface-raised: rgba(255, 255, 255, .82);
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --blue: #0071e3;
    --blue-hover: #0077ed;
    --line: rgba(29, 29, 31, .1);
    --danger: #b42318;
    --success: #167b3f;
    --shadow-small: 0 8px 30px rgba(0, 0, 0, .06);
    --shadow-large: 0 30px 80px rgba(0, 0, 0, .1);
    --radius-small: 14px;
    --radius-medium: 24px;
    --radius-large: 36px;
    --content: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.noraneko-black-label {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
    -webkit-font-smoothing: antialiased;
}

html[data-noraneko-language="ja"] [data-en],
html[data-noraneko-language="en"] [data-ja],
body.lang-ja [data-en],
body.lang-en [data-ja] {
    display: none !important;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.is-hidden {
    display: none !important;
}

.site-shell {
    min-height: 100vh;
    overflow: hidden;
}

.site-header {
    position: fixed;
    z-index: 100;
    inset: 0 0 auto;
    height: 56px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    background: rgba(250, 250, 252, .78);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.header-inner {
    width: min(var(--content), calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #37373a, #08080a);
    box-shadow: inset 0 1px rgba(255, 255, 255, .22);
    font-size: 13px;
    font-weight: 700;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    color: #3d3d40;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: color .2s ease;
}

.main-nav a:hover {
    color: var(--blue);
}

.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logout {
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    color: var(--blue);
    background: rgba(0, 113, 227, .09);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.header-logout:hover {
    background: rgba(0, 113, 227, .15);
}

.language-switch {
    display: flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(118, 118, 128, .12);
}

.language-switch button {
    min-width: 42px;
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.language-switch button[aria-pressed="true"] {
    color: var(--ink);
    background: var(--white);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
}

.menu-button {
    display: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 1px;
    margin: 5px auto;
    background: var(--ink);
    transition: transform .2s ease;
}

.hero {
    position: relative;
    min-height: min(720px, 92vh);
    padding: 136px 24px 88px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 88%, rgba(255, 255, 255, .98), rgba(255, 255, 255, .45) 42%, transparent 70%),
        linear-gradient(180deg, #fbfbfd, #f4f5f8);
}

.hero::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -110px;
    width: min(1100px, 92vw);
    height: 270px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, .76);
    filter: blur(24px);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: .8;
}

.hero-glow-one {
    width: 460px;
    height: 460px;
    left: calc(50% - 440px);
    top: 80px;
    background: radial-gradient(circle at 45% 45%, rgba(121, 188, 255, .36), rgba(169, 210, 255, .08) 55%, transparent 72%);
}

.hero-glow-two {
    width: 500px;
    height: 500px;
    right: calc(50% - 470px);
    top: 30px;
    background: radial-gradient(circle at 50% 50%, rgba(205, 177, 255, .26), rgba(255, 183, 211, .08) 55%, transparent 72%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(920px, 100%);
    text-align: center;
}

.eyebrow,
.section-kicker {
    margin: 0 0 16px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: var(--hero-title-size, 92px);
    line-height: .98;
    letter-spacing: -.065em;
    font-weight: 760;
}

.hero-copy {
    max-width: 710px;
    margin: 26px auto 0;
    color: var(--muted);
    font-size: clamp(18px, 2.1vw, 24px);
    line-height: 1.55;
    letter-spacing: -.02em;
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    min-height: 46px;
    padding: 0 21px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 650;
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    opacity: .55;
    cursor: wait;
    transform: none;
}

.button-primary {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 7px 18px rgba(0, 113, 227, .19);
}

.button-primary:hover {
    color: #fff;
    background: var(--blue-hover);
}

.button-secondary {
    color: var(--blue);
    background: rgba(255, 255, 255, .78);
    box-shadow: inset 0 0 0 1px rgba(0, 113, 227, .16), var(--shadow-small);
}

.hero-note {
    margin: 19px 0 0;
    color: #85858a;
    font-size: 13px;
}

.content-section {
    width: min(var(--content), calc(100% - 40px));
    margin: 0 auto;
    padding: 112px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 42px;
}

.section-heading h2 {
    margin: 0;
    font-size: var(--benefits-title-size, 66px);
    line-height: 1.04;
    letter-spacing: -.055em;
    font-weight: 740;
}

.section-heading > p:not(.section-kicker) {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.58;
    letter-spacing: -.018em;
}

.benefits-section {
    padding-top: 128px;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.benefit-grid.is-empty {
    display: none;
}

.benefit-card {
    position: relative;
    min-height: 390px;
    padding: 30px;
    border-radius: var(--radius-large);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    box-shadow: inset 0 1px rgba(255, 255, 255, .75);
}

.benefit-card::before,
.benefit-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.benefit-card::before {
    width: 250px;
    height: 250px;
    top: -55px;
    right: -40px;
    background: rgba(255, 255, 255, .62);
    filter: blur(1px);
}

.benefit-card::after {
    width: 150px;
    height: 150px;
    top: 55px;
    right: 80px;
    border: 1px solid rgba(255, 255, 255, .9);
}

.benefit-card-blue {
    background: linear-gradient(145deg, #d7edff, #f2f8ff 68%);
}

.benefit-card-lilac {
    background: linear-gradient(145deg, #e6dcff, #f8f3ff 68%);
}

.benefit-card-silver {
    background: linear-gradient(145deg, #e3e5e8, #f8f8fa 68%);
}

.benefit-number {
    position: absolute;
    top: 28px;
    left: 30px;
    color: rgba(29, 29, 31, .5);
    font-size: 13px;
    font-weight: 750;
}

.benefit-card h3,
.benefit-card p {
    position: relative;
    z-index: 2;
}

.benefit-card h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -.04em;
}

.benefit-card p {
    margin: 14px 0 0;
    color: rgba(29, 29, 31, .68);
    line-height: 1.65;
    font-size: 15px;
}

.member-section {
    padding-top: 40px;
}

.member-panel {
    padding: clamp(34px, 6vw, 76px);
    border-radius: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    align-items: center;
    gap: 70px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(83, 142, 255, .36), transparent 32%),
        radial-gradient(circle at 15% 100%, rgba(159, 104, 255, .24), transparent 34%),
        #101012;
    box-shadow: var(--shadow-large);
}

.member-copy h2 {
    margin: 0;
    font-size: var(--member-title-size, 64px);
    line-height: 1.04;
    letter-spacing: -.055em;
}

.member-copy > p:not(.section-kicker) {
    max-width: 550px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, .64);
    font-size: 18px;
    line-height: 1.65;
}

.login-form {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-medium);
    background: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.login-form > label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    font-weight: 650;
}

.password-control {
    display: flex;
    gap: 10px;
}

.password-control input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    outline: 0;
    color: #fff;
    background: rgba(0, 0, 0, .23);
}

.password-control input:focus {
    border-color: rgba(102, 177, 255, .88);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, .22);
}

.form-message {
    min-height: 22px;
    margin: 12px 3px 0;
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
    line-height: 1.5;
}

.form-message.is-error {
    color: #ffb4ae;
}

.form-message.is-success {
    color: #90e6b1;
}

.member-status {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-medium);
    background: rgba(255, 255, 255, .08);
}

.member-status > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #36c76c;
    box-shadow: 0 0 0 5px rgba(54, 199, 108, .13);
}

.text-button {
    margin-top: 18px;
    padding: 0;
    border: 0;
    color: #69b5ff;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
}

.gallery-section {
    padding-top: 90px;
}

body.member-authenticated .hero,
body.member-authenticated .benefits-section,
body.member-authenticated .member-section {
    display: none !important;
}

body.member-authenticated .public-nav {
    display: none !important;
}

body.member-authenticated .gallery-section {
    min-height: calc(100vh - 56px);
    padding-top: 104px;
}

html[data-noraneko-member-view="gallery"] body.member-authenticated .member-puzzle-section,
html[data-noraneko-member-view="puzzle"] body.member-authenticated .gallery-section {
    display: none !important;
}

.gallery-heading {
    max-width: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.gallery-heading h2 {
    font-size: var(--gallery-title-size, 66px);
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin: -18px 0 30px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}

.filter-button.is-active {
    color: #fff;
    background: var(--ink);
}

.gallery-message {
    min-height: 26px;
    color: var(--muted);
    font-size: 14px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 38px 18px;
}

.album-card {
    min-width: 0;
}

.album-card.is-open .album-cover-button {
    outline: 3px solid rgba(0, 113, 227, .34);
    outline-offset: 4px;
}

.album-cover-button {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    padding: 0;
    border: 0;
    border-radius: var(--radius-medium);
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
    box-shadow: var(--shadow-small);
}

.album-cover-button img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .65, .2, 1);
}

.album-cover-button:hover img {
    transform: scale(1.025);
}

.album-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, .48);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    font-size: 11px;
    font-weight: 700;
}

.album-meta {
    padding: 15px 4px 0;
}

.album-meta h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -.03em;
}

.album-meta p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.album-detail {
    grid-column: 1 / -1;
    margin: 4px 0 42px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow-small);
    scroll-margin-top: 82px;
}

.album-detail-header {
    margin-bottom: 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.album-detail-header h3 {
    margin: 0;
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.05;
    letter-spacing: -.05em;
}

.album-detail-header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.album-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.image-card {
    position: relative;
    min-width: 0;
    border-radius: 18px;
    overflow: hidden;
    background: var(--surface);
}

.image-card img {
    width: 100%;
    aspect-ratio: 9 / 16;
    display: block;
    object-fit: cover;
}

.image-download {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .5);
    box-shadow: none;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.image-download::before {
    content: "↓";
    font-size: 18px;
    font-weight: 500;
}

.member-comments {
    margin-top: 86px;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow-small);
}

.comments-heading {
    margin: 0 0 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.comments-heading h2 {
    font-size: clamp(34px, 5vw, 58px);
}

.comments-top-button {
    flex: 0 0 auto;
}

.comment-form {
    display: grid;
    gap: 16px;
}

.comment-form-grid {
    display: grid;
    grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr);
    gap: 14px;
}

.comment-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 15px;
    color: var(--ink);
    background: var(--surface);
    font: inherit;
    resize: vertical;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.comment-list {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}

.comment-item {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface);
}

.comment-item strong {
    display: block;
    margin-bottom: 7px;
}

.comment-item p {
    margin: 0 0 10px;
    white-space: pre-wrap;
}

.comment-item time,
.comment-empty {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    width: min(var(--content), calc(100% - 40px));
    margin: 60px auto 0;
    padding: 34px 0 44px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    font-size: 12px;
}

.site-footer > div {
    display: grid;
    gap: 5px;
}

.site-footer strong {
    color: var(--ink);
    font-size: 13px;
}

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: 1fr auto;
    }

    .main-nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        padding: 20px;
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--line);
        background: rgba(250, 250, 252, .96);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 14px 4px;
        border-bottom: 1px solid var(--line);
        font-size: 15px;
    }

    .main-nav a:last-child {
        border-bottom: 0;
    }

    .menu-button {
        display: block;
    }

    .benefit-grid {
        grid-template-columns: 1fr;
    }

    .benefit-card {
        min-height: 300px;
    }

    .member-panel {
        grid-template-columns: 1fr;
        gap: 38px;
    }

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

    .image-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .comment-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .header-inner,
    .content-section,
    .site-footer {
        width: min(100% - 28px, var(--content));
    }

    .brand-name {
        font-size: 14px;
    }

    .language-switch button {
        min-width: 38px;
        padding: 0 7px;
    }

    .header-logout {
        padding: 0 9px;
        font-size: 10px;
    }

    .hero {
        min-height: 650px;
        padding: 112px 18px 74px;
    }

    .hero-copy {
        font-size: 18px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .content-section {
        padding: 82px 0;
    }

    .section-heading > p:not(.section-kicker) {
        font-size: 17px;
    }

    .benefit-card {
        min-height: 280px;
        padding: 24px;
        border-radius: 28px;
    }

    .member-panel {
        padding: 34px 22px;
        border-radius: 30px;
    }

    .password-control {
        flex-direction: column;
    }

    .password-control .button {
        width: 100%;
    }

    .album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px;
    }

    .image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .album-detail-header {
        align-items: stretch;
        flex-direction: column;
    }

    .album-detail-actions .button {
        flex: 1;
    }

    .member-comments {
        margin-top: 64px;
        padding: 24px;
        border-radius: 28px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
