/* ═══════════════════════════════════════════════
   魔王の塔 — Help Pages (Shared)
   Matches the landing page dark fantasy aesthetic
   ═══════════════════════════════════════════════ */

:root {
    --void: #06060e;
    --abyss: #0c0c1a;
    --surface: #141428;
    --purple-deep: #4a0e8f;
    --purple: #7c3aed;
    --purple-glow: #a855f7;
    --purple-light: #c084fc;
    --gold: #f59e0b;
    --gold-bright: #fbbf24;
    --gold-pale: #fde68a;
    --white: #f8fafc;
    --white-80: rgba(248, 250, 252, 0.8);
    --white-60: rgba(248, 250, 252, 0.6);
    --white-40: rgba(248, 250, 252, 0.4);
    --white-15: rgba(248, 250, 252, 0.15);
    --white-08: rgba(248, 250, 252, 0.08);
    --white-04: rgba(248, 250, 252, 0.04);
    --red-accent: #fb7185;
    --font-body: 'Noto Sans JP', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--white-80);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Background ── */
.help-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.help-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
}

.help-bg-orb--1 {
    width: 500px;
    height: 500px;
    background: var(--purple-deep);
    top: -200px;
    right: -100px;
}

.help-bg-orb--2 {
    width: 400px;
    height: 400px;
    background: #2d1b69;
    bottom: -100px;
    left: -150px;
}

.help-bg-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
    opacity: 0.5;
}

/* ── Header ── */
.help-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 6, 14, 0.92);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--white-08);
}

.help-header-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.help-header-logo {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--gold-bright);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.help-header-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--white-60);
    text-decoration: none;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--white-08);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.help-header-back:hover {
    color: var(--white);
    border-color: var(--white-15);
    background: var(--white-04);
}

/* ── Main Content ── */
.help-main {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ── Page Title ── */
.help-page-title {
    font-weight: 900;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--white-08);
    background: linear-gradient(135deg, var(--white), var(--gold-pale));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Table of Contents ── */
.help-toc {
    background: linear-gradient(135deg, var(--white-08), var(--white-04));
    border: 1px solid var(--white-08);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 3rem;
}

.help-toc h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-toc ul {
    list-style: none;
    padding: 0;
}

.help-toc li {
    margin-bottom: 0.4rem;
}

.help-toc a {
    color: var(--purple-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    display: inline-block;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.help-toc a:hover {
    color: var(--white);
    border-bottom-color: var(--purple-light);
}

/* ── Welcome / Intro ── */
.help-intro {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent);
    border: 1px solid var(--white-08);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.help-intro h2 {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.help-intro p {
    color: var(--white-60);
    font-size: 0.95rem;
}

/* ── Sections ── */
.help-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 70px;
}

.help-section h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--white-08);
    position: relative;
}

.help-section h2::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), transparent);
}

.help-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-pale);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.help-section > p,
.help-section > ul,
.help-section > ol {
    margin-bottom: 1.25rem;
}

.help-section p {
    font-size: 0.95rem;
    color: var(--white-80);
}

/* ── Lists ── */
.help-section ul,
.help-section ol {
    padding-left: 1.5rem;
}

.help-section li {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: var(--white-80);
}

.help-section li p {
    margin-top: 0.4rem;
    margin-bottom: 0.75rem;
}

.help-section li ul,
.help-section li ol {
    margin-top: 0.5rem;
}

/* ── Strong / Emphasis ── */
.help-section strong {
    color: var(--red-accent);
    font-weight: 700;
}

/* ── Notes ── */
.help-note {
    font-size: 0.9rem;
    color: var(--white-60);
    border-left: 3px solid var(--purple);
    padding: 0.85rem 1.25rem;
    margin: 1.25rem 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent);
    border-radius: 0 10px 10px 0;
}

/* ── Footer ── */
.help-footer {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    text-align: center;
}

.help-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--purple-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--white-08);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.help-footer a:hover {
    color: var(--white);
    border-color: var(--purple);
    background: rgba(124, 58, 237, 0.1);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .help-main {
        padding: 2rem 1.25rem 3rem;
    }

    .help-toc {
        padding: 1.25rem 1.5rem;
    }

    .help-intro {
        padding: 1.5rem;
    }

    .help-section h2 {
        font-size: 1.25rem;
    }

    .help-section h3 {
        font-size: 1.05rem;
    }
}
