/* ── Design tokens ───────────────────────────── */
:root {
    --pink:       #e0608a;
    --pink-light: rgba(224, 96, 138, 0.12);
    --ink:        #1e0e18;
    --ink-mid:    rgba(30, 14, 24, 0.60);
    --ink-muted:  rgba(30, 14, 24, 0.38);
    --glass:      rgba(255, 255, 255, 0.78);
    --border:     rgba(255, 200, 220, 0.50);
    --border-hi:  rgba(224, 96, 138, 0.45);
    --shadow:     0 4px 24px rgba(180, 60, 120, 0.10);
    --shadow-lg:  0 16px 56px rgba(180, 60, 120, 0.18);
    --radius:     16px;
    --gap:        12px;
    --width:      1100px;
    --card-bg:    rgba(255, 255, 255, 0.82);
}

[data-theme="dark"] {
    --ink:       rgba(255, 240, 248, 0.92);
    --ink-mid:   rgba(255, 240, 248, 0.58);
    --ink-muted: rgba(255, 240, 248, 0.35);
    --glass:     rgba(20, 8, 16, 0.80);
    --border:    rgba(224, 96, 138, 0.20);
    --border-hi: rgba(224, 96, 138, 0.50);
    --card-bg:   rgba(22, 8, 18, 0.85);
    --shadow:    0 4px 24px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 16px 56px rgba(0, 0, 0, 0.45);
}

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

html { font-size: 18px; }

body {
    min-height: 100dvh;
    color: var(--ink);
    font-family: "Segoe UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
    background: #fce8f3 url('assets/bg.png') center / cover no-repeat scroll;
}

/* オーバーレイ */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.35);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='200' height='200' filter='url(%23g)' opacity='0.66'/></svg>");
    background-size: 200px 200px;
}

/* ── Corner controls ─────────────────────────── */
.corner-controls {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--ink-mid);
    background: var(--card-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    transition: background 150ms, color 150ms, border-color 150ms;
}

.lang-btn.is-active {
    background: var(--pink);
    color: #fff;
    border-color: transparent;
}

.debug-divider {
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    user-select: none;
}

.debug-badge {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    background: rgba(255, 80, 80, 0.85);
    color: #fff;
    border: 1px solid rgba(255,100,100,0.5);
}

.dark-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    font-size: 0.88rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 150ms;
}

/* ── Site wrapper ────────────────────────────── */
.site {
    position: relative;
    z-index: 1;
    width: min(100% - 28px, var(--width));
    margin: 0 auto;
    padding: 40px 0 52px;
    display: grid;
    gap: var(--gap);
}

/* ── Card base ───────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    padding: 22px 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--pink);
}

.card-all {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ink-mid);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 150ms;
}

.card-all:hover { color: var(--pink); }

/* ── Profile header ──────────────────────────── */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding-bottom: 6px;
    animation: fade-up 0.4s ease both;
}

.profile-header__avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    object-fit: cover;
}

.profile-header__name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.profile-header__bio {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.80);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.profile-header__social {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.social-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    transition: transform 150ms ease, opacity 150ms ease;
}

.social-btn:hover { transform: translateY(-2px); opacity: 0.85; }

.social-btn--x { background: rgba(20, 20, 20, 0.70); }
.social-btn--p { background: rgba(0, 150, 250, 0.65); }

.profile-header__tagline {
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ── Shop card ───────────────────────────────── */
.shop-card {
    display: grid;
    grid-template-columns: 1fr 200px;
    min-height: 240px;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    background: var(--card-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
    animation: fade-up 0.4s 0.06s ease both;
}

.shop-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hi);
}

.shop-card__body {
    padding: 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.shop-card__eyebrow {
    font-size: 0.60rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--pink);
}

.shop-card__heading {
    margin: 12px 0 10px;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.shop-card__note {
    font-size: 0.72rem;
    color: var(--ink-mid);
    line-height: 1.6;
    margin-bottom: 14px;
}

.shop-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--pink);
    background: var(--pink-light);
    border: 1px solid rgba(224, 96, 138, 0.22);
}

.shop-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    width: max-content;
    background: var(--ink);
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-top: auto;
    transition: background 180ms ease, gap 180ms ease;
}

.shop-card:hover .shop-card__btn { background: var(--pink); gap: 16px; }

.shop-card__icon {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, rgba(255, 210, 230, 0.7), rgba(245, 185, 215, 0.5));
    border-left: 1px solid var(--border);
    font-size: 3rem;
}

/* ── Platform grid ───────────────────────────── */
.platform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    animation: fade-up 0.4s 0.10s ease both;
}

.platform-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    background: var(--card-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.platform-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hi);
}

.platform-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 900;
    flex-shrink: 0;
    color: #fff;
}

.platform-card--patreon .platform-card__icon { background: linear-gradient(135deg, #ff6a4d, #e2431e); }
.platform-card--unifans .platform-card__icon { background: linear-gradient(135deg, #7c5cfc, #5a3dd8); }

.platform-card__body { flex: 1; min-width: 0; }

.platform-card__body strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.platform-card__body small {
    display: block;
    margin-top: 3px;
    font-size: 0.65rem;
    color: var(--ink-muted);
    line-height: 1.3;
}

.platform-card__arrow {
    font-size: 0.88rem;
    color: var(--ink-muted);
    transition: transform 170ms ease, color 170ms ease;
}

.platform-card:hover .platform-card__arrow { transform: translateX(3px); color: var(--pink); }

/* ── Mid grid ────────────────────────────────── */
.mid-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    animation: fade-up 0.4s 0.12s ease both;
}

/* Update card */
.update-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(224, 96, 138, 0.3) transparent;
    padding-right: 4px;
}

.update-list::-webkit-scrollbar { width: 4px; }
.update-list::-webkit-scrollbar-track { background: transparent; }
.update-list::-webkit-scrollbar-thumb { background: rgba(224, 96, 138, 0.35); border-radius: 999px; }

.update-item {
    display: grid;
    grid-template-columns: 48px auto 1fr;
    align-items: center;
    gap: 10px;
}

.update-item__thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
}

.update-thumb--red    { background: linear-gradient(135deg, #ffb6c8, #ff8fa8); }
.update-thumb--blue   { background: linear-gradient(135deg, #a0c4ff, #6fa3ff); }
.update-thumb--orange { background: linear-gradient(135deg, #ffd6a0, #ffb86a); }

.update-item__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.update-tag {
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.update-tag--red    { background: #ffe0e8; color: #d03060; }
.update-tag--blue   { background: #ddeeff; color: #1a5fbf; }
.update-tag--orange { background: #fff0dd; color: #c06010; }

.update-date {
    font-size: 0.60rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}

.update-item__text {
    font-size: 0.72rem;
    color: var(--ink-mid);
    line-height: 1.45;
}

/* About card */
.about-card {
    display: flex;
    flex-direction: column;
}

.about-title {
    display: block;
    margin: 10px 0 10px;
    font-size: 1.0rem;
    font-weight: 800;
}

.about-body {
    font-size: 0.72rem;
    color: var(--ink-mid);
    line-height: 1.7;
    flex: 1;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pink);
}

.stat span {
    font-size: 0.62rem;
    color: var(--ink-muted);
    letter-spacing: 0.04em;
}

/* ── Gallery ─────────────────────────────────── */
.gallery-card {
    animation: fade-up 0.4s 0.18s ease both;
}

.gallery-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gallery-scroll::-webkit-scrollbar { display: none; }

.gallery-item {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.gallery-item {
    position: relative;
    cursor: pointer;
    transition: transform 170ms ease, box-shadow 170ms ease;
}

.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px 10px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
    border-radius: 10px;
}

.gallery-item__tag {
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.75);
    margin-bottom: 3px;
}

.gallery-item__title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.gallery-item--1 { background: linear-gradient(145deg, #ffcce0, #e8a0c0); }
.gallery-item--2 { background: linear-gradient(145deg, #c8b0f0, #9880d8); }
.gallery-item--3 { background: linear-gradient(145deg, #ffd0e8, #f0a8cc); }
.gallery-item--4 { background: linear-gradient(145deg, #b8d0f8, #90b4f0); }

/* ── Link trio ───────────────────────────────── */
.link-trio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gap);
    animation: fade-up 0.4s 0.22s ease both;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    background: var(--card-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hi);
}

.link-card__icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    font-weight: 900;
    flex-shrink: 0;
    color: #fff;
}

.link-card--gallery .link-card__icon { background: linear-gradient(135deg, #f07090, #d04070); }
.link-card--pixiv   .link-card__icon { background: linear-gradient(135deg, #4080e0, #2060c0); }
.link-card--x       .link-card__icon { background: linear-gradient(135deg, #222, #444); }

.link-card__body { flex: 1; min-width: 0; }

.link-card__body strong {
    display: block;
    font-size: 0.80rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.link-card__body small {
    display: block;
    margin-top: 3px;
    font-size: 0.65rem;
    color: var(--ink-muted);
    line-height: 1.3;
}

.link-card__arrow {
    font-size: 0.88rem;
    color: var(--ink-muted);
    transition: transform 170ms ease, color 170ms ease;
}

.link-card:hover .link-card__arrow { transform: translateX(3px); color: var(--pink); }

/* ── Footer ──────────────────────────────────── */
.footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px 0;
    animation: fade-up 0.4s 0.26s ease both;
}

.footer__logo {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.55);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.footer__copy {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.38);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.footer__nav {
    display: flex;
    gap: 16px;
}

.footer__nav a {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: color 150ms;
}

.footer__nav a:hover { color: rgba(255,255,255,0.85); }

.footer__social {
    display: flex;
    gap: 10px;
}

.footer__social a {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.70rem;
    font-weight: 900;
    text-decoration: none;
    background: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.22);
    transition: background 150ms;
}

.footer__social a:hover { background: rgba(255,255,255,0.32); }

/* ── Age gate ────────────────────────────────── */
.age-gate {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
}

.age-gate[hidden] { display: none; }

.age-gate__box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: fade-up 0.2s ease both;
}

.age-gate__title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
    color: var(--ink);
}

.age-gate__body {
    font-size: 0.75rem;
    color: var(--ink-mid);
    line-height: 1.75;
    margin-bottom: 24px;
}

.age-gate__btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.age-gate__confirm {
    padding: 12px 20px;
    border-radius: 999px;
    border: none;
    background: var(--ink);
    color: #fff;
    font-size: 0.80rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 170ms ease;
}

.age-gate__confirm:hover { background: var(--pink); }

.age-gate__cancel {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease;
}

.age-gate__cancel:hover { color: var(--ink); border-color: var(--ink-mid); }

/* ── Animations ──────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mid-grid  { animation: fade-up 0.4s 0.12s ease both; }

/* ── Reduced motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ── Tablet (≤ 900px) ────────────────────────── */
@media (max-width: 900px) {
    .shop-card { grid-template-columns: 1fr; min-height: auto; }
    .shop-card__icon { display: none; }

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

    .link-trio { grid-template-columns: 1fr 1fr; }

    .gallery-scroll { grid-template-columns: repeat(4, 1fr); }

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

/* ── Mobile (≤ 600px) ────────────────────────── */
@media (max-width: 600px) {
    html { font-size: 16px; }

    .site {
        width: min(100% - 20px, var(--width));
        padding: 52px 0 40px;
        gap: 10px;
    }

    /* カードのパディングを縮める */
    .card { padding: 18px 16px; }

    .shop-card__heading { font-size: 1.2rem; }
    .shop-card__body { padding: 18px 16px; }
    .shop-card__badges { gap: 5px; }

    .update-list { max-height: 190px; }

    /* ギャラリーを2×2グリッドに */
    .gallery-scroll {
        grid-template-columns: repeat(2, 1fr);
        overflow-x: unset;
    }

    .gallery-item { aspect-ratio: 4 / 3; }

    .link-trio { grid-template-columns: 1fr; }

    .link-card { padding: 13px 14px; }
    .link-card__icon { width: 36px; height: 36px; font-size: 1.05rem; }

    .footer__nav { display: none; }
}
