:root {
    --page-bg: #ffffff;
    --surface: #ffffff;
    --text: #1a1f2b;
    --muted: #646c7f;
    --accent: #3047c9;
    --accent-hover: #2334a0;
    --border: #e5e9f2;
    --policy-link: #000000;
    --toggle-base: rgba(255, 255, 255, 0.85);
    --toggle-border: rgba(21, 29, 48, 0.18);
}

:root[data-theme="dark"] {
    --page-bg: #0c111f;
    --surface: #121a2e;
    --text: #ecf1ff;
    --muted: #9aa4c5;
    --accent: #a9bbff;
    --accent-hover: #c6d2ff;
    --border: rgba(184, 199, 255, 0.14);
    --policy-link: #ffffff;
    --toggle-base: rgba(15, 22, 38, 0.78);
    --toggle-border: rgba(196, 210, 255, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    transition: background 0.3s ease, color 0.3s ease;
    color-scheme: light dark;
}

main.layout {
    max-width: 680px;
    margin: clamp(4rem, 12vw, 6rem) auto clamp(3rem, 10vw, 5rem);
    padding: 0 clamp(1.6rem, 6vw, 3.5rem);
}

h1 {
    margin: 0;
    font-size: clamp(1.56rem, 4vw, 2.04rem);
    letter-spacing: -0.02em;
    font-weight: 600;
}

.location {
    margin-top: 0.75rem;
    font-size: 1rem;
    color: var(--muted);
}

.tagline {
    margin-top: 0.85rem;
    font-size: 0.98rem;
    max-width: 46ch;
}

.tagline span {
    display: block;
    margin-top: 0.45rem;
}

h2 {
    margin-top: clamp(2.6rem, 5vw, 3.6rem);
    margin-bottom: 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.link-list {
    margin-top: 1.1rem;
}

.link-list li + li {
    margin-top: 0.6rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--accent-hover);
    text-decoration: none;
}

.theme-toggle {
    position: fixed;
    top: clamp(1.2rem, 3vw, 2rem);
    right: clamp(1.2rem, 3vw, 2rem);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--toggle-border);
    background: var(--toggle-base);
    backdrop-filter: blur(12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
    z-index: 10;
    box-shadow: 0 18px 32px rgba(21, 29, 48, 0.08);
}

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

.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(48, 71, 201, 0.35);
}

.theme-toggle svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: currentColor;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .icon-moon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}

.theme-toggle .icon-sun {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

:root[data-theme="light"] .theme-toggle {
    color: var(--text);
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

:root[data-theme="dark"] .theme-toggle {
    color: #f5f7ff;
    box-shadow: 0 18px 32px rgba(5, 9, 18, 0.45);
}

.link-row {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    font-size: 1.05rem;
}

.link-row strong {
    font-weight: 600;
    color: var(--text);
}

.link-row span {
    font-weight: 400;
    color: var(--muted);
}

.note {
    margin-top: clamp(2.8rem, 6vw, 3.8rem);
    font-size: 0.95rem;
    color: var(--muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.back-link:hover,
.back-link:focus {
    color: var(--accent-hover);
}

.author-name {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.app-name {
    margin-top: 0.75rem;
    font-size: clamp(1.84rem, 4.8vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.date {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.description {
    margin-top: 1.6rem;
    font-size: 1.02rem;
    max-width: 58ch;
}

.description p + p {
    margin-top: 1rem;
}

.store-list,
.policy-list {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
}

.store-list li {
    margin-bottom: 0.6rem;
}

.store-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.store-notice {
    font-size: 0.9rem;
    color: var(--muted);
    margin-left: 1.4rem;
}

.policy-list li + li {
    margin-top: 0.55rem;
}

.policy-list a {
    color: var(--policy-link);
}

.policy-list a:hover,
.policy-list a:focus {
    color: var(--policy-link);
}

@media (max-width: 640px) {
    main.layout {
        padding: 2.75rem 1.4rem 3.2rem;
        border-radius: 20px;
    }

    .link-row {
        gap: 0.3rem;
    }

    .store-notice {
        margin-left: 1rem;
    }
}