:root {
    color-scheme: light;
    --ink: #252a27;
    --muted: #69716c;
    --paper: #f7f7f4;
    --surface: #fff;
    --line: #dedfda;
    --accent: #426b5a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-size: 1rem;
    line-height: 1.5;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    z-index: 10;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.6rem 0.8rem;
    transform: translateY(-150%);
    color: #fff;
    background: var(--ink);
    border-radius: 0.25rem;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.topbar {
    display: flex;
    width: min(100% - 2rem, 72rem);
    min-height: 4.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-inline: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: var(--accent);
    border-radius: 0.65rem;
}

.brand-mark svg {
    width: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.brand-name {
    font-size: 0.98rem;
    font-weight: 650;
}

.topbar-end {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    padding-block: 0.35rem;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
    text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--ink);
}

.nav-link[aria-current="page"] {
    border-bottom-color: var(--accent);
}

.language-picker {
    position: relative;
}

.language-picker > summary {
    list-style: none;
}

.language-picker > summary::-webkit-details-marker {
    display: none;
}

.language-trigger {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    color: var(--muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
}

.language-trigger svg {
    width: 0.75rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.language-code {
    text-transform: uppercase;
}

.language-options {
    position: absolute;
    z-index: 5;
    top: calc(100% + 0.25rem);
    right: 0;
    min-width: 8rem;
    padding: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0.35rem;
}

.language-option {
    display: flex;
    min-height: 2.4rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    color: var(--ink);
    border-radius: 0.2rem;
    font-size: 0.88rem;
    text-decoration: none;
}

.language-option:hover,
.language-option[aria-current="true"] {
    background: var(--paper);
}

.page-main {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.home-page {
    display: grid;
    min-height: calc(100svh - 4.25rem);
    place-items: center;
    padding-block: 2rem;
}

.home-message {
    max-width: 32rem;
    margin: 0;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    text-align: center;
}

.wishlists-page {
    max-width: 52rem;
    min-height: calc(100svh - 4.25rem);
    padding-block: clamp(2.5rem, 7vw, 5rem);
}

.page-heading {
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.wishlist-card {
    display: flex;
    min-width: 0;
    min-height: 4.5rem;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0.35rem;
    text-decoration: none;
    transition: border-color 140ms ease;
}

.wishlist-card:hover {
    border-color: var(--accent);
}

.wishlist-avatar {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    place-items: center;
    color: var(--accent);
    background: #eef1ed;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 650;
}

.wishlist-card-copy {
    min-width: 0;
}

.wishlist-name {
    overflow-wrap: anywhere;
    font-size: 0.98rem;
    font-weight: 600;
}

.external-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--muted);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

@media (max-width: 600px) {
    .topbar {
        width: min(100% - 1.25rem, 72rem);
    }

    .topbar-end {
        gap: 0.8rem;
    }

    .nav-home {
        display: none;
    }

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

@media (max-width: 360px) {
    .brand-name {
        font-size: 0.9rem;
    }

    .topbar-end {
        gap: 0.55rem;
    }

    .nav-link,
    .language-trigger {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
