:root {
    --bg: #f2efe8;
    --bg-deep: #d8d1c2;
    --surface: rgba(255, 252, 246, 0.86);
    --surface-strong: #fffdf8;
    --text: #201c17;
    --muted: #655c50;
    --accent: #7b5f37;
    --accent-soft: #ecd8ae;
    --line: rgba(53, 40, 22, 0.12);
    --shadow: 0 24px 80px rgba(44, 33, 19, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(236, 216, 174, 0.9), transparent 25%),
        linear-gradient(135deg, var(--bg) 0%, #e7e0d2 45%, var(--bg-deep) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(32, 28, 23, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(32, 28, 23, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 85%);
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 56px 32px 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(28, 25, 21, 0.92), rgba(62, 48, 29, 0.82)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
    color: #f6f0e6;
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 216, 174, 0.4), transparent 68%);
}

.hero__badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.74rem;
    font-weight: 800;
}

.hero__badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero h1 {
    margin: 16px 0 12px;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(3rem, 8vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: 0.04em;
}

.hero__lead {
    max-width: 700px;
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(246, 240, 230, 0.82);
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero__meta span {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.94rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.copy-ip {
    display: grid;
    gap: 10px;
    width: min(100%, 360px);
    margin-top: 22px;
}

.copy-ip__label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(246, 240, 230, 0.68);
}

.hero__actions--compact {
    margin-top: 20px;
}

.button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.button:hover,
.text-link:hover {
    transform: translateY(-1px);
}

.button--light {
    color: #1f1912;
    background: #f5e8cb;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.button--copy {
    width: 100%;
    min-height: 62px;
    padding: 14px 18px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #f6f0e6;
    text-align: left;
}

.button--copy:hover {
    background: rgba(255, 255, 255, 0.14);
}

.button--copy.is-copied {
    background: rgba(236, 216, 174, 0.2);
    border-color: rgba(236, 216, 174, 0.4);
}

.button--copy-surface {
    border-color: rgba(123, 95, 55, 0.16);
    background: var(--surface-strong);
    color: var(--text);
}

.button--copy-surface:hover {
    background: rgba(255, 252, 246, 0.92);
}

.button--copy-surface.is-copied {
    background: rgba(236, 216, 174, 0.44);
    border-color: rgba(123, 95, 55, 0.28);
}

.copy-ip__value,
.copy-ip__hint {
    display: block;
}

.copy-ip__value {
    font-size: 1rem;
    line-height: 1.2;
}

.copy-ip__hint {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(246, 240, 230, 0.72);
    line-height: 1;
}

.copy-ip__status {
    min-height: 1.2rem;
    font-size: 0.88rem;
    color: rgba(236, 216, 174, 0.94);
}

.copy-ip--surface {
    width: 100%;
    margin-top: 0;
}

.copy-ip--surface .copy-ip__label {
    color: var(--accent);
}

.copy-ip--surface .copy-ip__hint {
    color: var(--muted);
}

.copy-ip--surface .copy-ip__status {
    color: var(--accent);
}

.text-link {
    margin-top: 18px;
    color: var(--accent);
    font-weight: 800;
}

.text-link::after {
    content: "->";
    margin-left: 8px;
}

main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.intro-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.intro-overview__aside {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(123, 95, 55, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.58);
}

.card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.card--intro {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(249, 243, 233, 0.86));
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    background: rgba(123, 95, 55, 0.08);
}

.card h2 {
    margin: 0 0 12px;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.15;
}

.card p,
.feature-list li,
.command-grid li,
.site-footer p {
    font-size: 1rem;
    line-height: 1.7;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.quick-list,
.feature-list,
.command-grid {
    margin: 0;
    padding: 0;
    list-style: none;
}

.quick-list {
    display: grid;
    gap: 10px;
}

.quick-list li {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(123, 95, 55, 0.06);
    color: var(--text);
    font-weight: 700;
    line-height: 1.5;
}

.feature-list {
    display: grid;
    gap: 12px;
}

.feature-list li {
    position: relative;
    padding: 14px 16px 14px 48px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--text);
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 19px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #b89258);
    box-shadow: 0 0 0 6px rgba(123, 95, 55, 0.12);
}

.command-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.command-grid li {
    padding: 10px 14px;
    border: 1px solid rgba(123, 95, 55, 0.16);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding: 0 8px;
    color: rgba(32, 28, 23, 0.72);
}

.site-footer p {
    margin: 0;
}

.page-shell--story {
    padding-bottom: 56px;
}

.hero--story {
    min-height: 320px;
}

.story-layout {
    grid-template-columns: 1fr;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.story-sequence {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.story-sequence__group {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.58);
}

.story-sequence__group h3 {
    margin: 0 0 8px;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.2rem;
}

.story-sequence__group p {
    margin: 0;
}

.story-sequence__chapters {
    margin-top: 8px !important;
    color: var(--accent) !important;
    font-weight: 800;
}

.story-chapter p + p {
    margin-top: 14px;
}

.story-note {
    margin-top: 16px !important;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(123, 95, 55, 0.08);
    color: var(--text) !important;
}

.story-letter {
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(241, 231, 208, 0.92));
}

.story-quote {
    margin: 20px 0;
    padding: 18px 20px;
    border-left: 4px solid var(--accent);
    border-radius: 16px;
    background: rgba(123, 95, 55, 0.08);
}

.story-quote p {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.timeline {
    display: grid;
    gap: 18px;
}

.timeline-item {
    position: relative;
    overflow: hidden;
}

.timeline-item::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--accent), #d0b070);
}

.timeline-item h2,
.character-card h2,
.story-sequence__group h3 {
    padding-right: 12px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.lore-file {
    min-height: 100%;
}

.file-meta {
    display: grid;
    gap: 14px;
    margin: 0;
}

.file-meta div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(123, 95, 55, 0.08);
}

.file-meta dt {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.file-meta dd {
    margin: 0;
    color: var(--text);
    line-height: 1.65;
}

.character-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.tag-list li {
    padding: 8px 12px;
    border: 1px solid rgba(123, 95, 55, 0.16);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.secret-card {
    background: linear-gradient(180deg, rgba(246, 238, 220, 0.95), rgba(231, 218, 189, 0.92));
}

@media (max-width: 900px) {
    .page-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 10px;
    }

    .hero {
        padding: 40px 22px 28px;
        border-radius: 24px;
    }

    main {
        grid-template-columns: 1fr;
    }

    .intro-overview {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 22px;
        border-radius: 22px;
    }

    .site-footer {
        flex-direction: column;
        padding: 0 2px;
    }

    .story-sequence {
        grid-template-columns: 1fr;
    }

    .character-grid {
        grid-template-columns: 1fr;
    }

    .file-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero__lead,
    .card p,
    .feature-list li,
    .command-grid li,
    .site-footer p {
        font-size: 0.96rem;
    }

    .hero__meta span,
    .command-grid li {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
