:root {
    color-scheme: light;
    --paper: #ffffff;
    --surface: #f7f7f8;
    --text: #202123;
    --muted: #6e6e73;
    --border: #dedee2;
    --accent: #202123;
    --accent-hover: #343541;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--paper);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
}

button { font: inherit; }
.content-width { width: min(100% - 96px, 1180px); margin-inline: auto; }
.site-header { background: var(--paper); border-bottom: 1px solid #ececef; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.brand-mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 4px; transform: rotate(-12deg); }
.brand-mark span { width: 9px; height: 9px; background: var(--accent); }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { background: #b9b9be; }
.header-section { margin-right: 56px; color: var(--muted); font-size: 13px; }
h1, h2, p { margin: 0; }
.main-content { padding-block: 28px 80px; }

.notice-region { background: var(--surface); border-bottom: 1px solid #ececef; }
.notice-region[hidden], .page-state[hidden], .pagination[hidden], .retry-button[hidden] { display: none; }

.notice {
    padding-block: 24px;
    color: #3f4043;
    font-size: 14px;
    line-height: 1.6;
}

.notice p + p, .notice ul, .notice ol { margin-top: 8px; }
.notice ul, .notice ol { padding-left: 20px; }
.notice a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.notice a:focus-visible { outline: 3px solid rgba(32, 33, 35, .28); outline-offset: 2px; }

.site-notice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    grid-template-areas:
        "head service"
        "summary service"
        "details details";
    column-gap: 42px;
    padding-block: 23px 17px;
}

.site-notice-head { grid-area: head; display: flex; align-items: center; gap: 18px; }
.site-notice h1 { font-size: 21px; line-height: 1.35; font-weight: 700; }
.site-notice-status {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 7px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.site-notice-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9d9da3; }
.site-notice-status.is-healthy { border-color: #d6e6dc; background: #edf5f0; color: #3b7555; }
.site-notice-status.is-healthy::before { background: #448a68; }
.site-notice-summary { grid-area: summary; align-self: start; margin-top: 7px; color: #4f5055; font-size: 14px; line-height: 1.6; }
.site-notice-service {
    grid-area: service;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding-left: 26px;
    border-left: 1px solid var(--border);
}

.site-notice-contact { min-width: 0; font-size: 14px; line-height: 1.5; }
.site-notice-contact strong { font-weight: 700; white-space: nowrap; }
.site-notice-note { margin-top: 4px; color: var(--muted); font-size: 12px; }
.site-notice-shop { display: flex; align-items: center; gap: 12px; }
.site-notice-shop-note { color: var(--muted); font-size: 11px; }
.site-notice-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.site-notice-primary:hover { background: var(--accent-hover); }
.site-notice-resource-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 10px; }
.site-notice-resource { color: var(--text); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.site-notice-resource:hover { color: #55565b; }
.site-notice-details { grid-area: details; margin-top: 17px; padding-top: 11px; border-top: 1px solid var(--border); font-size: 12px; }
.site-notice-details summary { width: fit-content; cursor: pointer; color: #4f5055; font-weight: 600; }
.site-notice-details-body { max-width: 920px; padding-top: 10px; color: var(--muted); line-height: 1.7; }
.site-notice-details ol { margin: 12px 0 0; padding-left: 20px; }
.site-notice-details li + li { margin-top: 8px; }
.site-notice a:focus-visible, .site-notice summary:focus-visible { outline: 3px solid rgba(32, 33, 35, .28); outline-offset: 3px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.section-heading h2 { font-size: 18px; line-height: 1.4; font-weight: 650; }
.section-heading span { color: var(--muted); font-size: 13px; }

.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 20px; }
.entry-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 152px;
    padding: 19px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.entry-card:hover { border-color: #a9a9af; box-shadow: 0 6px 18px rgba(32, 33, 35, .07); transform: translateY(-2px); }
.entry-card:focus-visible, .brand:focus-visible, .load-button:focus-visible, .retry-button:focus-visible {
    outline: 3px solid rgba(32, 33, 35, .28);
    outline-offset: 3px;
}

.entry-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.entry-name { min-width: 0; overflow-wrap: anywhere; font-size: 17px; line-height: 1.35; font-weight: 650; }
.entry-label {
    flex: none;
    max-width: 48%;
    overflow: hidden;
    padding: 4px 7px;
    border: 1px solid #e8e8eb;
    border-radius: 4px;
    background: var(--surface);
    color: #55565b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry-bottom { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 22px; }
.entry-status { display: flex; align-items: center; min-width: 0; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, #9d9da3); }
.status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-action { flex: none; color: #4f5055; font-size: 12px; font-weight: 600; }
.page-state { padding: 44px 16px; color: var(--muted); font-size: 14px; text-align: center; }

.retry-button, .load-button { min-height: 42px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background .2s, border-color .2s; }
.retry-button { margin-top: 18px; padding: 0 24px; border: 0; background: var(--accent); color: white; }
.retry-button:hover { background: var(--accent-hover); }
.pagination { display: flex; justify-content: center; padding-top: 32px; }
.load-button { min-width: 136px; padding: 0 20px; border: 1px solid var(--border); background: var(--paper); color: var(--text); }
.load-button:hover { border-color: #a9a9af; background: var(--surface); }
.load-button:disabled { cursor: wait; color: var(--muted); }
#loadSentinel { width: 1px; height: 1px; align-self: end; }

body > .floating-ai {
    position: absolute !important;
    top: 18px !important;
    right: max(48px, calc((100vw - 1180px) / 2)) !important;
    bottom: auto !important;
    width: 40px !important;
    height: 40px !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: var(--paper) !important;
    box-shadow: none !important;
    color: var(--muted) !important;
    animation: none !important;
    transform: none !important;
}

body > .floating-ai:hover { border-color: #a9a9af !important; background: var(--surface) !important; }
body > .floating-ai:focus-visible { outline: 3px solid rgba(32, 33, 35, .28); outline-offset: 3px; }
body > .floating-ai::before, body > .floating-ai::after { content: none !important; animation: none !important; }
body > .floating-ai .ai-icon, body > .floating-ai svg { color: var(--muted) !important; animation: none !important; }

body > .qr-code {
    position: absolute !important;
    top: 66px !important;
    right: max(48px, calc((100vw - 1180px) / 2)) !important;
    bottom: auto !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: var(--paper) !important;
    box-shadow: 0 8px 24px rgba(32, 33, 35, .12) !important;
}

body > .qr-code .copy-button { border-radius: 6px !important; background: var(--accent) !important; }
body > .qr-code .copy-button:hover { background: var(--accent-hover) !important; }
body > .floating-ai:focus + .qr-code, body > .qr-code:focus-within { display: block !important; }

.entry-skeleton {
    min-height: 152px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f2f2f3;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton { 50% { background: #e9e9ec; } }

@media (max-width: 900px) {
    .content-width { width: min(100% - 56px, 1180px); }
    .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-notice { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); column-gap: 24px; }
    .site-notice-service { padding-left: 18px; }
}

@media (max-width: 600px) {
    .content-width { width: min(100% - 40px, 1180px); }
    .header-inner { min-height: 72px; }
    .header-section { display: none; }
    body > .floating-ai { top: 16px !important; right: 20px !important; }
    body > .qr-code { right: 20px !important; }
    .main-content { padding-block: 24px 64px; }
    .entry-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 16px; }
    .entry-card, .entry-skeleton { min-height: 132px; }
    .entry-card { padding: 17px 18px; }
    .site-notice { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "summary" "service" "details"; padding-block: 19px 16px; }
    .site-notice-head { align-items: start; gap: 10px; }
    .site-notice h1 { font-size: 19px; }
    .site-notice-status { margin-top: 2px; }
    .site-notice-summary { margin-top: 8px; }
    .site-notice-service { align-items: stretch; gap: 10px; margin-top: 14px; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
    .site-notice-shop { justify-content: space-between; gap: 8px; }
    .site-notice-resource-links { gap: 8px 16px; }
    .site-notice-details { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .entry-card, .retry-button, .load-button, .site-notice-primary { transition: none; }
    .entry-card:hover { transform: none; }
    .entry-skeleton { animation: none; }
}
