@font-face {
    font-family: "jf-jinxuanlatte-2.1";
    src: url("../assets/fonts/jf-jinxuanlatte-medium.otf") format("opentype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "jf-jinxuanlatte-2.1";
    src: url("../assets/fonts/jf-jinxuanlatte-heavy.otf") format("opentype");
    font-style: normal;
    font-weight: 900;
    font-display: swap;
}

@font-face {
    font-family: "jf-kamabit-1.0";
    src: url("../assets/fonts/jf-kamabit-1.0.otf") format("opentype");
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

:root {
    --ink: #293943;
    --muted: #6e7778;
    --line: #e9ded2;
    --surface: #fffefa;
    --soft: #f6faf6;
    --green: #8fc9ad;
    --green-dark: #356f61;
    --blue: #83c9d2;
    --amber: #f5bc4f;
    --red: #ed5c50;
    --pink: #f4a39b;
    --peach: #ffdfbd;
    --mint: #e2f3e8;
    --sky: #e2f4f7;
    --paper: #fffbf3;
    --stamp: #df4e45;
    --navy: #293943;
    --shadow: 0 12px 30px rgba(66, 83, 78, 0.09);
    --font-primary: "jf-jinxuanlatte-2.1", "Microsoft JhengHei", system-ui, sans-serif;
    --font-accent: "jf-kamabit-1.0", "jf-jinxuanlatte-2.1", "Microsoft JhengHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background:
        linear-gradient(90deg, rgba(131, 201, 210, 0.07) 1px, transparent 1px),
        linear-gradient(0deg, rgba(237, 92, 80, 0.045) 1px, transparent 1px),
        var(--soft);
    background-size: 40px 40px;
    color: var(--ink);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 500;
}

strong,
b {
    font-family: var(--font-primary);
    font-weight: 900;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

.site-header,
.site-footer {
    background: rgba(255, 253, 248, 0.96);
    border-color: var(--line);
    border-style: solid;
    width: 100%;
}

.site-header {
    min-height: 76px;
    border-width: 0 0 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px clamp(18px, 3vw, 42px) 13px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
}

.site-header::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--red) 0 25%, var(--amber) 25% 50%, var(--green) 50% 75%, var(--blue) 75% 100%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--paper);
    border: 1px solid #e7d9c8;
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
    box-shadow: 0 5px 12px rgba(41, 57, 67, 0.09);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.2;
}

.brand strong {
    color: var(--navy);
    font-size: 19px;
}

.brand small {
    color: var(--muted);
    margin-top: 2px;
    font-size: 12px;
}

.brand small b {
    color: var(--stamp);
    font-weight: 900;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
    background: var(--peach);
    color: var(--stamp);
    outline: none;
}

.site-nav a.is-active {
    box-shadow: inset 0 -2px 0 var(--red);
}

.system-switch {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 3px;
    padding: 3px;
    border: 1px solid #d8e3de;
    border-radius: 10px;
    background: #f2f6f3;
}

.site-nav .system-switch a,
.collection-nav .system-switch a {
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 7px;
    color: #65756f;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav .system-switch a:hover,
.site-nav .system-switch a:focus-visible,
.site-nav .system-switch a.is-active {
    color: #fff;
    background: var(--red);
    box-shadow: none;
    outline: none;
}

.collection-nav .system-switch a:hover,
.collection-nav .system-switch a:focus-visible,
.collection-nav .system-switch a.is-active {
    color: #fff;
    background: #2f746d;
    box-shadow: none;
    outline: none;
}

.site-footer {
    border-width: 1px 0 0;
    padding: 18px clamp(18px, 3vw, 40px);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.site-footer nav {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.site-footer nav a {
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
    text-underline-offset: 3px;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
    color: var(--stamp);
    outline: none;
}

@media (max-width: 1100px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 9px 14px 11px;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .brand strong {
        font-size: 17px;
    }

    .site-nav {
        width: 100%;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a {
        min-height: 36px;
        flex: 0 0 auto;
        justify-content: center;
        padding: 7px 8px;
        white-space: nowrap;
        font-size: 13px;
    }

    .site-nav .system-switch a {
        min-height: 30px;
        padding: 6px 9px;
        font-size: 12px;
    }
}
