:root {
    color-scheme: light dark;

    --page: #f7f7f5;
    --surface: #ffffff;
    --surface-soft: #f2f2ef;
    --surface-hover: #fcfcfb;
    --surface-active: #eeeeeb;
    --text: #18181b;
    --text-soft: #3f3f46;
    --muted: #62626a;
    --subtle: #8a8a91;
    --accent: #18181b;
    --accent-hover: #3f3f46;
    --accent-soft: #f2f2ef;
    --on-accent: #ffffff;
    --signal: #c2410c;
    --ok: #15803d;
    --live: #16a34a;
    --border: rgb(24 24 27 / 8%);
    --border-strong: rgb(24 24 27 / 16%);
    --border-input: #8a8a90;
    --brand: #4f46e5;
    --brand-soft: rgb(79 70 229 / 10%);
    --focus: var(--brand);
    --ring: 0 0 0 4px rgb(79 70 229 / 14%);
    --glass: rgb(247 247 245 / 84%);
    --highlight: 0 0 #0000;

    --shadow-sm: 0 1px 2px rgb(24 24 27 / 4%);
    --shadow-md: 0 1px 2px rgb(24 24 27 / 4%), 0 10px 24px -12px rgb(24 24 27 / 14%);
    --shadow-popover: 0 1px 2px rgb(24 24 27 / 6%), 0 18px 40px -12px rgb(24 24 27 / 22%);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --content: 1080px;
    --prose: 720px;
    --bar-h: 56px;
    --pad-top: 40px;
    --pad-x: 32px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #08080a;
        --surface: #19191c;
        --surface-soft: #202024;
        --surface-hover: #222226;
        --surface-active: #2b2b30;
        --text: #f4f4f5;
        --text-soft: #d4d4d8;
        --muted: #a1a1aa;
        --subtle: #7c7c85;
        --accent: #f4f4f5;
        --accent-hover: #ffffff;
        --accent-soft: #202024;
        --on-accent: #08080a;
        --signal: #fb923c;
        --ok: #4ade80;
        --live: #4ade80;
        --border: #3a3a41;
        --border-strong: #56565f;
        --border-input: #71717a;
        --brand: #a5b4fc;
        --brand-soft: rgb(165 180 252 / 14%);
        --focus: var(--brand);
        --ring: 0 0 0 4px rgb(165 180 252 / 18%);
        --glass: rgb(8 8 10 / 84%);
        --highlight: inset 0 1px 0 rgb(255 255 255 / 5%);
        --shadow-sm: inset 0 1px 0 rgb(255 255 255 / 5%), 0 1px 2px rgb(0 0 0 / 50%);
        --shadow-md: inset 0 1px 0 rgb(255 255 255 / 7%), 0 1px 2px rgb(0 0 0 / 50%), 0 16px 32px -14px rgb(0 0 0 / 80%);
        --shadow-popover: inset 0 1px 0 rgb(255 255 255 / 7%), 0 1px 2px rgb(0 0 0 / 60%), 0 24px 48px -12px rgb(0 0 0 / 85%);
    }
}

@media (prefers-contrast: more) {
    :root {
        --muted: var(--text-soft);
        --subtle: var(--muted);
        --border: var(--border-input);
        --border-strong: var(--text-soft);
    }
}

html {
    background:
        radial-gradient(900px 360px at 50% -170px, color-mix(in srgb, var(--brand) 7%, transparent), transparent 72%) no-repeat,
        var(--page);
    color: var(--text);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip;
    scroll-padding-top: calc(var(--bar-h) + 16px);
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
    accent-color: var(--accent);
}

body {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--content);
    margin: 0 auto;
    padding: var(--pad-top) var(--pad-x) 56px;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;
}

h1, h2, h3, h4, h5 {
    color: var(--text);
    font-weight: 600;
    line-height: 1.35;
}

h1 {
    margin-bottom: 14px;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

h1, h2, h3 {
    text-wrap: balance;
}

p, li {
    text-wrap: pretty;
}

h2 {
    margin-bottom: 16px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

h3 {
    margin-bottom: 12px;
    font-size: 18px;
    letter-spacing: -0.015em;
}

h4, h5 {
    margin-bottom: 8px;
    font-size: 16px;
}

p {
    margin-bottom: 16px;
}

a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}

a:hover {
    color: var(--brand);
    text-decoration-color: currentColor;
}

button, input, select, textarea {
    box-sizing: border-box;
    font: inherit;
    color: inherit;
}

button, input[type="button"], select {
    cursor: pointer;
}

button, input, select, textarea, a {
    -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

::selection {
    background: var(--brand-soft);
    color: var(--text);
}

img {
    max-width: 100%;
}

hr {
    border: 0;
}

:where(body, main) > br,
.content-container > br {
    display: none;
}

ins.adsbygoogle[data-ad-status="filled"] {
    margin-block: 24px;
}

@property --bar-bg {
    syntax: "<color>";
    inherits: false;
    initial-value: transparent;
}

@property --bar-line {
    syntax: "<color>";
    inherits: false;
    initial-value: transparent;
}

body > nav:has(> .breadcrumb) {
    --bar-bg: var(--glass);
    --bar-line: var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
    box-sizing: border-box;
    height: var(--bar-h);
    margin: calc(-1 * var(--pad-top)) 0 28px;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(var(--bar-line), var(--bar-line)) 0 0 1 0 / 0 0 1px 0 / 0 100vmax;
    background: var(--bar-bg);
    box-shadow: 0 0 0 100vmax var(--bar-bg);
    clip-path: inset(0 -100vmax);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    view-transition-name: topbar;
}

.breadcrumb {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.4;
}

.breadcrumb li {
    display: none;
    min-width: 0;
}

.breadcrumb li:nth-last-child(2) {
    display: flex;
    grid-column: 1;
    justify-self: start;
    min-width: 0;
    margin-left: -10px;
}

.breadcrumb li:nth-last-child(2) a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    max-width: 100%;
    height: 36px;
    padding: 0 14px 0 12px;
    overflow: hidden;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 450;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.breadcrumb li:nth-last-child(2) a::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin: 0 0 0 3px;
    border-bottom: 1.75px solid currentColor;
    border-left: 1.75px solid currentColor;
    transform: rotate(45deg);
    transition: transform 160ms var(--ease);
}

.breadcrumb li:nth-last-child(2) a:hover {
    background: var(--surface-active);
    color: var(--text);
}

.breadcrumb li:nth-last-child(2) a:hover::before {
    transform: translateX(-2px) rotate(45deg);
}

.breadcrumb li:last-child {
    display: block;
    grid-column: 2;
    max-width: min(56vw, 520px);
}

.breadcrumb li:last-child a {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: center;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

@supports (animation-timeline: scroll()) {
    body > nav:has(> .breadcrumb) {
        --bar-bg: transparent;
        --bar-line: transparent;
        animation: bar-raise linear both;
        animation-timeline: scroll(root);
        animation-range: 0 32px;
    }

    .breadcrumb li:last-child {
        opacity: 0;
        animation: bar-title linear both;
        animation-timeline: scroll(root);
        animation-range: 56px 128px;
    }
}

@keyframes bar-raise {
    from {
        --bar-bg: transparent;
        --bar-line: transparent;
    }
    to {
        --bar-bg: var(--glass);
        --bar-line: var(--border);
    }
}

@keyframes bar-title {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 180ms;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}

.page-header {
    margin-bottom: 28px;
}

.page-header > :last-child {
    margin-bottom: 0;
}

.page-header h1 img,
:where(body, main) > h1 img {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 52px;
    height: 52px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    object-fit: contain;
}

.page-header h1:has(> img) {
    display: flex;
    align-items: center;
    gap: 18px;
}

.page-header h1 img[src$=".svg"],
:where(body, main) > h1 img[src$=".svg"] {
    padding: 11px;
    background: var(--surface-soft);
}

.page-header h1 img[src*="/IMG/app-"],
:where(body, main) > h1 img[src*="/IMG/app-"] {
    padding: 0;
    border-radius: 12px;
    object-fit: cover;
}

.page-description {
    max-width: var(--prose);
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 56px 0 18px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.5;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.site-divider {
    height: 1px;
    margin: 28px 0;
    border: 0;
    background: var(--border);
}

span[style*="bellShake"] {
    flex: 0 0 auto;
    animation: none !important;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 20%, transparent);
    font-size: 0;
    line-height: 0;
    vertical-align: middle;
}

.page-intro:has(a),
.home-notice,
.page-header .page-description:has(> a:only-child) {
    font-size: 0;
    line-height: 0;
}

:is(.page-intro, .home-notice) a,
.page-header .page-description > a:only-child {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 30px;
    margin: 0 8px 8px 0;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 450;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: top;
    transition: border-color 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
}

:is(.page-intro, .home-notice) a:hover,
.page-header .page-description > a:only-child:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
    background: var(--surface-hover);
    color: var(--text);
}

.site-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 88px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.site-contact > a,
.site-contact > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--highlight);
    cursor: pointer;
    transition: border-color 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}

.site-contact > a:hover,
.site-contact > button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.site-contact > a,
.site-contact > button {
    color: var(--muted);
}

.site-contact > a:hover,
.site-contact > button:hover {
    color: var(--text);
}

.contact-icon {
    display: block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    transition: color 160ms var(--ease);
}

@media (max-width: 600px) {
    :root {
        --bar-h: 52px;
        --pad-top: 24px;
        --pad-x: 18px;
    }

    body {
        padding: var(--pad-top) var(--pad-x) 40px;
    }

    .breadcrumb li:last-child {
        max-width: 52vw;
    }

    .section-title {
        margin-top: 40px;
    }
}

@media (forced-colors: active) {
    .myButton,
    .app-card,
    .search-bar input,
    .site-contact > a,
    .site-contact > button {
        border: 1px solid CanvasText;
    }
}

@media (prefers-reduced-motion: reduce) {
    body > nav:has(> .breadcrumb) {
        --bar-bg: var(--glass);
        --bar-line: var(--border);
        animation: none;
    }

    .breadcrumb li:last-child {
        animation: none;
        opacity: 1;
    }

    @view-transition {
        navigation: none;
    }
}

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