:root {
    color-scheme: light;
    --bg: #f9f6ee;
    --bg-deep: #f4efe1;
    --surface: rgba(255, 253, 248, 0.92);
    --surface-solid: #fffdf8;
    --surface-strong: rgba(255, 253, 248, 0.96);
    --surface-soft: #f6f0e3;
    --surface-border: rgba(62, 50, 34, 0.1);
    --text: #2f2a24;
    --muted: #625a53;
    --accent: #5a23a8;
    --accent-dark: #3f187a;
    --accent-soft: #ece4f6;
    --shadow: 0 24px 60px rgba(47, 33, 21, 0.08);
    --radius-panel: 30px;
    --radius-card: 24px;
    --transition-standard: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}

a {
    color: inherit;
}

.site-home {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(236, 228, 246, 0.9), transparent 32%),
        radial-gradient(circle at top right, rgba(246, 240, 227, 0.9), transparent 28%),
        linear-gradient(180deg, #fffdf8 0%, var(--bg) 46%, var(--bg-deep) 100%);
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 24px auto 48px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.78);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(47, 33, 21, 0.04);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
}

.brand h1 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand p {
    margin: 2px 0 0;
    font-size: 1.0rem;
    color: var(--muted);
}

.tablist {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--surface-border);
}

.tab-button {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition:
        background-color var(--transition-standard),
        color var(--transition-standard),
        transform var(--transition-standard);
}

.tab-button:hover,
.tab-button:focus-visible {
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.82);
    outline: none;
}

.tab-button[aria-selected="true"] {
    color: var(--accent-dark);
    background: var(--surface-solid);
    box-shadow: 0 8px 22px rgba(90, 35, 168, 0.12);
}

.panel {
    display: none;
    margin-top: 22px;
}

.panel.is-active {
    display: block;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 0 clamp(16px, 4vw, 40px);
}

.hero-copy,
.content-card {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-panel);
    background: var(--surface);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.hero-copy {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 24px 96px 24px 96px;
}

.hero-copy h2 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 0.8;
    font-weight: 500;
    color: var(--text);
    text-align: center;
}

.hero-copy p {
    max-width: 50rem;
    margin: 20px 0 0;
    font-size: 1.2rem;
    line-height: 1.1;
}

.content-card {
    padding: 24px;
}

.content-card h2,
.content-card h3 {
    margin-top: 0;
    margin-bottom: 18px;
    text-align: center;
}

.content-card h2 {
    font-size: clamp(1.8rem, 2.0vw, 3.8rem);
    font-weight: 500;
    line-height: 0.95;
}

.content-card h3 {
    font-size: 1.4rem;
}

.content-card p,
.content-card li {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.85;
    margin: 0 0 1rem;
}

.content-card ul {
    padding-left: 24px;
    margin: 20px 0 0;
}

.content-card ul li {
    margin-bottom: 0.9rem;
}

.tech-sections {
    display: grid;
    gap: 16px;
    margin-top: 18px;
    margin-bottom: 30px;
}

.tech-sections details {
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    padding: 18px 20px;
    background: rgba(255, 253, 248, 0.9);
}

.tech-sections summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    outline: none;
}

.tech-sections summary::-webkit-details-marker {
    display: none;
}

.tech-sections summary::marker {
    display: none;
}

.tech-sections summary::before {
    content: "▸";
    display: inline-block;
    width: 1.2em;
    transition: transform 150ms ease;
}

.tech-sections details[open] summary::before {
    transform: rotate(90deg);
}

.tech-sections p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.readme-link {
    margin-top: 28px;
}

.content-card a {
    color: #1f1f1f;
    text-decoration: underline;
}

.app-links {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.link-card {
    display: block;
    padding: 24px;
    border-radius: var(--radius-card);
    background: var(--surface-strong);
    border: 1px solid var(--surface-border);
    box-shadow: 0 18px 36px rgba(47, 33, 21, 0.06);
    color: inherit;
    text-decoration: none;
    transition:
        transform var(--transition-standard),
        box-shadow var(--transition-standard),
        border-color var(--transition-standard);
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(90, 35, 168, 0.24);
    box-shadow: 0 24px 46px rgba(90, 35, 168, 0.1);
}

.link-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.link-card span {
    color: var(--muted);
    line-height: 1.7;
}

.link-card--button {
    cursor: pointer;
}

.button {
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition:
        transform var(--transition-standard),
        box-shadow var(--transition-standard),
        background-color var(--transition-standard);
}

.button--primary {
    background: var(--accent);
    color: #fffdf8;
}

.button--secondary {
    background: var(--accent-soft);
    color: var(--text);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(90, 35, 168, 0.14);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 14, 30, 0.62);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 50;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-dialog {
    width: min(100%, 520px);
    max-height: 90vh;
    overflow: auto;
    background: var(--surface-solid);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 30px 80px rgba(20, 14, 30, 0.2);
    position: relative;
    border: 1px solid var(--surface-border);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.modal-dialog h2 {
    margin: 0;
    font-size: clamp(1.8rem, 2.2vw, 2.2rem);
}

.modal-dialog p {
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.modal-field {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.modal-field label {
    font-size: 0.95rem;
    color: var(--text);
}

.modal-field input {
    width: 100%;
    border: 1px solid rgba(62, 50, 34, 0.14);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: #fffefd;
    color: var(--text);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.modal-success {
    margin-top: 20px;
    color: var(--muted);
}

.modal-success p {
    margin: 0 0 18px;
}

.modal-success a {
    text-decoration: none;
}

@media (max-width: 640px) {
    .modal-dialog {
        padding: 24px;
    }

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

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

.shot {
    border: 1px solid var(--surface-border);
    border-radius: 22px;
    background: var(--surface-strong);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    background: var(--surface-soft);
    box-shadow: 0 18px 32px rgba(47, 33, 21, 0.08);
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
}

.shot strong {
    font-size: 1.2rem;
}

.shot span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 1.0rem;
    line-height: 1.8;
}

.shot-copy {
    padding: 0 4px 4px;
}

.policy-layout {
    display: grid;
    gap: 22px;
}

.policy-card {
    padding: 36px;
}

.policy-card h3 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.policy-card h2,
.policy-card h3 {
    text-align: left;
}

.policy-card ul {
    padding-left: 20px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--surface-border);
    color: var(--muted);
    font-size: 0.95rem;
}

.footer {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 920px) {
    .shots-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 32px 26px;
    }

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

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1120px);
        margin-top: 10px;
    }

    .tablist {
        width: 100%;
    }

    .tab-button {
        flex: 1;
        text-align: center;
    }

    .content-card,
    .policy-card {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .hero {
        padding: 0 10px;
    }

    .hero-copy {
        border-radius: 22px;
    }

    .hero-copy h2 {
        font-size: clamp(2rem, 12vw, 3.2rem);
    }
}
