/**
 * 游戏日历 /calendar（pages/page-game-calendar.php），只在日历页加载，版本号用自身 filemtime。
 * 品牌色同 xy-brand.css：#f58907 / 渐变 #f58907 → #e67d00。深色模式跟主题 body.dark-open。
 * 链接和按钮的选择器都带 .xy-gcal 前缀：dark.css 的 `.dark-open a` / 按钮规则同权重会把它们盖掉。
 */

.xy-gcal {
    --gc-card: #fff;
    --gc-line: #ececec;
    --gc-text: #222;
    --gc-sub: #888;
    --gc-soft: #f6f7f9;
    padding: 24px 0 40px;
}
.dark-open .xy-gcal {
    --gc-card: #232323;
    --gc-line: #333;
    --gc-text: #e6e6e6;
    --gc-sub: #9a9a9a;
    --gc-soft: #2b2b2b;
}

/* ---------- 顶部 ---------- */
.xy-gcal-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 30px;
    margin-bottom: 18px;
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 92% -20%, rgba(255, 255, 255, .28) 0, rgba(255, 255, 255, 0) 45%),
        linear-gradient(120deg, #f58907 0%, #e67d00 55%, #d35f00 100%);
    box-shadow: 0 6px 20px rgba(245, 137, 7, .25);
}
.xy-gcal-hero h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}
.xy-gcal-hero h1 i {
    margin-right: 6px;
    opacity: .9;
}
.xy-gcal-hero p {
    margin: 0;
    font-size: 14px;
    opacity: .92;
}
.xy-gcal-stats {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}
.xy-gcal-stats li {
    min-width: 92px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    text-align: center;
}
.xy-gcal-stats b {
    display: block;
    font-size: 22px;
    line-height: 1.2;
}
.xy-gcal-stats span {
    font-size: 12px;
    opacity: .9;
}
.xy-gcal-crumb {
    margin-bottom: 6px;
    font-size: 13px;
    opacity: .9;
}
.xy-gcal .xy-gcal-crumb a,
.xy-gcal .xy-gcal-pager a {
    color: #fff;
}
.xy-gcal-pager {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.xy-gcal .xy-gcal-pager a {
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    font-size: 14px;
    white-space: nowrap;
}
.xy-gcal .xy-gcal-pager a:hover {
    background: rgba(255, 255, 255, .3);
    color: #fff;
}

/* ---------- 筛选条 ---------- */
.xy-gcal-bar {
    margin-bottom: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--gc-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}
.xy-gcal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.xy-gcal .xy-gcal-chip {
    padding: 6px 16px;
    border: 1px solid var(--gc-line);
    border-radius: 999px;
    background: var(--gc-card);
    color: var(--gc-text);
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: all .15s ease;
}
.xy-gcal .xy-gcal-chip:hover {
    border-color: #f58907;
    color: #c56a00;
}
.xy-gcal .xy-gcal-chip.is-on {
    border-color: transparent;
    background: linear-gradient(135deg, #f58907 0%, #e67d00 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 137, 7, .35);
}
.xy-gcal-months {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--gc-line);
    overflow-x: auto;
    scrollbar-width: thin;
}
.xy-gcal .xy-gcal-months a {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 8px;
    background: var(--gc-soft);
    color: var(--gc-text);
    font-size: 13px;
    white-space: nowrap;
}
.xy-gcal .xy-gcal-months a:hover {
    color: #c56a00;
}
.xy-gcal-months em {
    margin-left: 4px;
    font-style: normal;
    font-size: 12px;
    color: var(--gc-sub);
}

/* ---------- 分区 ---------- */
.xy-gcal-sec {
    margin-top: 26px;
    scroll-margin-top: 90px;
}
.xy-gcal-h {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 14px;
    padding-left: 12px;
    border-left: 4px solid #f58907;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gc-text);
}
.xy-gcal-h i {
    color: #f58907;
}
.xy-gcal-h small {
    font-size: 13px;
    font-weight: 400;
    color: var(--gc-sub);
}
.xy-gcal .xy-gcal-more {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: var(--gc-sub);
}
.xy-gcal .xy-gcal-more:hover {
    color: #c56a00;
}
.xy-gcal-none,
.xy-gcal-empty {
    padding: 30px 0;
    color: var(--gc-sub);
    text-align: center;
}
.xy-gcal-empty {
    padding: 80px 0;
    border-radius: 14px;
    background: var(--gc-card);
}
.xy-gcal-sec.is-recent .xy-gcal-card {
    opacity: .82;
}

/* ---------- 卡片 ---------- */
.xy-gcal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.xy-gcal-grid.is-focus {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.xy-gcal-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    background: var(--gc-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.xy-gcal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}
.xy-gcal-card.is-off {
    display: none;
}
.xy-gcal-cover {
    position: relative;
    display: block;
    aspect-ratio: 460 / 215;
    overflow: hidden;
    background: var(--gc-soft);
}
.xy-gcal-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.xy-gcal-card:hover .xy-gcal-cover img {
    transform: scale(1.04);
}
/* 没有封面：平台色块，右下角淡淡写平台名 */
.xy-gcal-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 10px 14px;
    color: #fff;
    background: linear-gradient(135deg, #3a3f47 0%, #1f2329 100%);
}
.xy-gcal-ph[hidden] {
    display: none;
}
.xy-gcal-ph b {
    font-size: 30px;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: .3;
    white-space: nowrap;
}
.xy-gcal-ph-ps { background: linear-gradient(135deg, #1f6fd1 0%, #0b3c8c 100%); }
.xy-gcal-ph-ns { background: linear-gradient(135deg, #ff4c55 0%, #c4001a 100%); }
.xy-gcal-ph-xbox { background: linear-gradient(135deg, #2aa33a 0%, #0c5d14 100%); }
.xy-gcal-ph-pc { background: linear-gradient(135deg, #48525f 0%, #1b2430 100%); }

/* 日期角标 */
.xy-gcal-when {
    position: absolute;
    left: 10px;
    top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    padding: 4px 8px 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .95);
    color: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    line-height: 1.1;
}
.xy-gcal-when b {
    font-size: 22px;
    font-weight: 800;
    color: #e67d00;
}
.xy-gcal-when i {
    margin-top: 2px;
    font-size: 11px;
    font-style: normal;
    color: #555;
    white-space: nowrap;
}
.xy-gcal-when.is-tbd {
    min-width: 0;
    padding: 5px 9px;
}
.xy-gcal-when.is-tbd i {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #c56a00;
}
.xy-gcal-online {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(124, 58, 237, .92);
    color: #fff;
    font-size: 12px;
    line-height: 1.6;
}

.xy-gcal-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 12px 14px 14px;
}
.xy-gcal-name {
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--gc-text);
}
.xy-gcal .xy-gcal-name a {
    color: inherit;
}
.xy-gcal .xy-gcal-name a:hover {
    color: #e67d00;
}
.xy-gcal-en {
    margin: 2px 0 0;
    overflow: hidden;
    font-size: 12px;
    color: var(--gc-sub);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.xy-gcal-plats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}
.xy-gcal-plat {
    padding: 1px 7px;
    border-radius: 5px;
    background: #4a5361;
    color: #fff;
    font-size: 11px;
    line-height: 1.6;
}
.xy-gcal-plat.is-ps { background: #0b5cc5; }
.xy-gcal-plat.is-ns { background: #d9001b; }
.xy-gcal-plat.is-xbox { background: #107c10; }

.xy-gcal-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--gc-sub);
}
.xy-gcal-cd {
    flex-shrink: 0;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--gc-soft);
    color: var(--gc-text);
    font-weight: 600;
}
.xy-gcal-cd.is-soon {
    background: #fff1de;
    color: #b35c00;
}
.xy-gcal-cd.is-today {
    background: linear-gradient(135deg, #f58907 0%, #e67d00 100%);
    color: #fff;
}
.xy-gcal-cd.is-out {
    color: var(--gc-sub);
    font-weight: 400;
}
.dark-open .xy-gcal-cd.is-soon {
    background: #4a3214;
    color: #ffb557;
}
.xy-gcal-tags {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.xy-gcal-acts {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}
.xy-gcal .xy-gcal-btn {
    flex: 1;
    padding: 6px 0;
    border: 1px solid var(--gc-line);
    border-radius: 8px;
    color: var(--gc-text);
    font-size: 13px;
    text-align: center;
    transition: all .15s ease;
}
.xy-gcal .xy-gcal-btn i {
    margin-left: 2px;
    font-size: 11px;
    opacity: .7;
}
.xy-gcal .xy-gcal-btn:hover {
    border-color: #f58907;
    color: #c56a00;
}
.xy-gcal .xy-gcal-btn.is-dl {
    border-color: transparent;
    background: linear-gradient(135deg, #f58907 0%, #e67d00 100%);
    color: #fff;
}
.xy-gcal .xy-gcal-btn.is-dl i {
    margin: 0 2px 0 0;
    opacity: 1;
}
.xy-gcal .xy-gcal-btn.is-dl:hover {
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 137, 7, .35);
}

/* 预约：和「官网」并排；点过变红色实心 */
.xy-gcal .xy-gcal-want {
    background: var(--gc-card);
    cursor: pointer;
}
.xy-gcal .xy-gcal-want i {
    margin: 0 2px 0 0;
    color: #e8455d;
    opacity: 1;
}
.xy-gcal-want em {
    margin-left: 4px;
    font-size: 12px;
    font-style: normal;
    color: var(--gc-sub);
}
.xy-gcal-want em[hidden] {
    display: none;
}
.xy-gcal .xy-gcal-want:hover {
    border-color: #f5a3b0;
    color: #d6334d;
}
.xy-gcal .xy-gcal-want.is-on {
    border-color: #f5b5bf;
    background: #fff0f2;
    color: #d6334d;
}
.dark-open .xy-gcal .xy-gcal-want.is-on {
    border-color: #6b2a35;
    background: #3a1f25;
    color: #ff8fa0;
}
.xy-gcal .xy-gcal-want:disabled {
    opacity: .6;
    cursor: wait;
}

/* 左栏入口：我预约的 / 预约排行（入口行：渐变图标块 + 文字 + 数量 + 箭头） */
.xy-gcal-quick {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: -2px 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--gc-line);
}
.xy-gcal .xy-gcal-quickitem {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 12px 7px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--gc-soft);
    color: var(--gc-text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.xy-gcal .xy-gcal-quickitem:hover {
    border-color: var(--gc-line);
    background: var(--gc-card);
}
.xy-gcal-quickitem b {
    flex: 1;
    font-weight: 600;
}
.xy-gcal-quickitem > i {
    font-size: 11px;
    color: var(--gc-sub);
}
.xy-gcal-qico {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #fff;
}
.xy-gcal-qico svg {
    width: 16px;
    height: 16px;
}
.xy-gcal-qico.is-mine {
    background: linear-gradient(135deg, #ff7a93 0%, #e8455d 100%);
    box-shadow: 0 2px 6px rgba(232, 69, 93, .35);
}
.xy-gcal-qico.is-rank {
    background: linear-gradient(135deg, #ffcf4a 0%, #f59e0b 100%);
    box-shadow: 0 2px 6px rgba(245, 158, 11, .35);
}
.xy-gcal-quickitem em {
    min-width: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ffe3e8;
    color: #d6334d;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.xy-gcal-quickitem em[hidden] {
    display: none;
}
.dark-open .xy-gcal-quickitem em {
    background: #4a1f28;
    color: #ff8fa0;
}
/* 选中：浅色底 + 品牌橙描边，不整块变色（和上面的分组按钮区分开） */
.xy-gcal .xy-gcal-quickitem.is-on {
    border-color: #f58907;
    background: #fff6eb;
    box-shadow: none;
}
.dark-open .xy-gcal .xy-gcal-quickitem.is-on {
    background: #3a2a16;
}
.xy-gcal .xy-gcal-quickitem.is-on > i {
    color: #e67d00;
}

/* 列表正上方的平台筛选 */
.xy-gcal-mainbar {
    margin-bottom: 14px;
}
.xy-gcal-mainbar .xy-gcal-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.xy-gcal-mainbar .xy-gcal-filters::-webkit-scrollbar {
    display: none;
}
.xy-gcal-mainbar .xy-gcal-chip {
    flex-shrink: 0;
}
/* 「我预约的」下面的小提示：预约 = 站内通知 */
.xy-gcal-quick-tip {
    margin: 0;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--gc-sub);
}
.xy-gcal-quick-tip i {
    margin-right: 3px;
    color: #e8455d;
}
/* 左栏卡片里「我预约的 / 预约排行」是最后一块时不要底部分隔线 */
.xy-gcal-quick:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

/* 左栏预约排行（宽屏；窄屏不显示，用「预约排行」入口） */
.xy-gcal-siderank {
    overflow: hidden;
    border-radius: 14px;
    background: var(--gc-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}
.xy-gcal-siderank-head {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--gc-line);
}
.xy-gcal-siderank-head .xy-gcal-qico {
    width: 24px;
    height: 24px;
    border-radius: 7px;
}
.xy-gcal-siderank-head .xy-gcal-qico svg {
    width: 14px;
    height: 14px;
}
.xy-gcal-siderank-head b {
    flex: 1;
    font-size: 14px;
    color: var(--gc-text);
}
.xy-gcal .xy-gcal-siderank-all {
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: var(--gc-sub);
    font-size: 12px;
    cursor: pointer;
}
.xy-gcal .xy-gcal-siderank-all:hover {
    color: #e67d00;
}
.xy-gcal-siderank-all i {
    font-size: 10px;
}
.xy-gcal-siderank-list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 4px 6px 6px;
    overflow-y: auto;
    list-style: none;
    scrollbar-width: thin;
}
.xy-gcal-sritem.is-off {
    display: none;
}
.xy-gcal .xy-gcal-sr {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gc-text);
    text-align: left;
    cursor: pointer;
}
.xy-gcal .xy-gcal-sr:hover {
    background: var(--gc-soft);
}
.xy-gcal-sr-no {
    flex-shrink: 0;
    width: 18px;
    font-size: 13px;
    font-weight: 800;
    font-style: italic;
    text-align: center;
    color: var(--gc-sub);
}
.xy-gcal-sr-no.is-top1,
.xy-gcal-sr-no.is-top2,
.xy-gcal-sr-no.is-top3 {
    height: 18px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    line-height: 18px;
}
.xy-gcal-sr-no.is-top1 { background: linear-gradient(135deg, #ffd65a, #f2a900); }
.xy-gcal-sr-no.is-top2 { background: linear-gradient(135deg, #d9dde3, #a3abb6); }
.xy-gcal-sr-no.is-top3 { background: linear-gradient(135deg, #f0b38a, #c9773f); }
.xy-gcal-sr-cover {
    flex-shrink: 0;
    width: 64px;
    aspect-ratio: 460 / 215;
    overflow: hidden;
    border-radius: 5px;
    background: linear-gradient(135deg, #48525f, #1b2430);
}
.xy-gcal-sr-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.xy-gcal-sr-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}
.xy-gcal-sr-txt b {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.xy-gcal-sr-txt i {
    overflow: hidden;
    font-size: 11px;
    font-style: normal;
    color: var(--gc-sub);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.xy-gcal-sr-txt em {
    font-style: normal;
    font-weight: 700;
    color: #e8455d;
}
.xy-gcal-siderank-none {
    margin: 0;
    padding: 16px 14px;
    font-size: 12px;
    color: var(--gc-sub);
}
.xy-gcal-siderank-none[hidden] {
    display: none;
}

/* 预约排行 */
.xy-gcal-ranklist {
    margin: 0;
    padding: 6px;
    border-radius: 14px;
    background: var(--gc-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    list-style: none;
}
.xy-gcal-rankitem {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 10px;
}
.xy-gcal-rankitem + .xy-gcal-rankitem {
    border-top: 1px solid var(--gc-line);
}
.xy-gcal-rankitem:hover {
    background: var(--gc-soft);
}
.xy-gcal-rankitem.is-off {
    display: none;
}
.xy-gcal-rankno {
    flex-shrink: 0;
    width: 28px;
    font-size: 18px;
    font-weight: 800;
    font-style: italic;
    text-align: center;
    color: var(--gc-sub);
}
.xy-gcal-rankno.is-top {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    font-style: normal;
}
.xy-gcal-rankno.is-top1 { background: linear-gradient(135deg, #ffd65a, #f2a900); box-shadow: 0 2px 6px rgba(242, 169, 0, .4); }
.xy-gcal-rankno.is-top2 { background: linear-gradient(135deg, #d9dde3, #a3abb6); }
.xy-gcal-rankno.is-top3 { background: linear-gradient(135deg, #f0b38a, #c9773f); }
.xy-gcal-rankcover {
    flex-shrink: 0;
    display: block;
    width: 128px;
    aspect-ratio: 460 / 215;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #48525f, #1b2430);
}
.xy-gcal-rankcover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.xy-gcal-rankmain {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.xy-gcal-rankmain b {
    overflow: hidden;
    font-size: 15px;
    color: var(--gc-text);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.xy-gcal-rankmeta {
    overflow: hidden;
    font-size: 12px;
    color: var(--gc-sub);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.xy-gcal-rankcount {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 56px;
    line-height: 1.2;
}
.xy-gcal-rankcount b {
    font-size: 20px;
    font-weight: 800;
    color: #e8455d;
}
.xy-gcal-rankcount i {
    font-size: 11px;
    font-style: normal;
    color: var(--gc-sub);
}
.xy-gcal-rankact {
    flex-shrink: 0;
    width: 104px;
}
.xy-gcal-rankact .xy-gcal-btn {
    display: block;
    width: 100%;
}
.xy-gcal-none.is-empty {
    padding: 50px 20px;
    border-radius: 14px;
    background: var(--gc-card);
}

/* 焦点卡片大一号 */
.xy-gcal-card.is-big .xy-gcal-name {
    font-size: 17px;
}

.xy-gcal-src {
    margin: 34px 0 0;
    font-size: 12px;
    color: var(--gc-sub);
    text-align: center;
}
.xy-gcal .xy-gcal-src a {
    color: var(--gc-sub);
    text-decoration: underline;
}

/* ---------- 两栏：左侧月历 + 筛选（宽屏固定不随页面滚走），右侧卡片列表 ---------- */
.xy-gcal-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.xy-gcal-main {
    min-width: 0;
    /* 按日期筛选会把大批卡片隐藏：浏览器的滚动锚定会因锚点消失把页面顶回最上面（实测 300 → 0），这里关掉，筛选时页面原地不动 */
    overflow-anchor: none;
}
.xy-gcal-main > .xy-gcal-sec:first-of-type {
    margin-top: 6px;
}
@media (min-width: 992px) {
    .xy-gcal-layout {
        display: grid;
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 24px;
        align-items: start;
    }
    /* 左栏固定：整列不超过屏幕高，月历和筛选不缩，排行占满剩下的高度、在自己的卡片里滚动。
       屏幕实在太矮（排行连 150px 都放不下）才让整列滚动兜底 */
    .xy-gcal-side {
        position: sticky;
        top: 96px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        scrollbar-width: thin;
        gap: 12px;
    }
    .xy-gcal-mini {
        order: 1;
        flex-shrink: 0;
    }
    .xy-gcal-side .xy-gcal-bar {
        order: 2;
        flex-shrink: 0;
        margin: 0;
    }
    .xy-gcal-siderank {
        order: 3;
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 150px;
    }
    .xy-gcal-rankbtn.is-narrow-only {
        display: none !important; /* 宽屏左栏已经有排行，入口只给窄屏 */
    }
    .xy-gcal-side .xy-gcal-quick {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: 0;
    }
    .xy-gcal-side .xy-gcal-chip {
        padding: 5px 13px;
        font-size: 13px;
    }
    .xy-gcal-side .xy-gcal-months {
        display: none; /* 宽屏有月历翻月，月份胶囊只给窄屏用 */
    }
    .xy-gcal-grid.is-focus {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* ---------- 分组切换：即将发售 / 日期待定 / 已发售 ---------- */
.xy-gcal-views {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--gc-line);
}
.xy-gcal .xy-gcal-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: 1px solid var(--gc-line);
    border-radius: 10px;
    background: var(--gc-card);
    color: var(--gc-text);
    cursor: pointer;
    transition: all .15s ease;
}
.xy-gcal-view b {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.xy-gcal-view em {
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.1;
    color: #e67d00;
}
.xy-gcal .xy-gcal-view:hover {
    border-color: #f58907;
}
.xy-gcal .xy-gcal-view.is-on {
    border-color: transparent;
    background: linear-gradient(135deg, #f58907 0%, #e67d00 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 137, 7, .35);
}
.xy-gcal .xy-gcal-view.is-on em {
    color: #fff;
}

/* ---------- 月历面板（深蓝，浅色 / 深色模式通用） ---------- */
.xy-gcal-mini-box {
    padding: 16px 14px 14px;
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(110, 160, 255, .35) 0, rgba(110, 160, 255, 0) 55%),
        linear-gradient(165deg, #2f5596 0%, #33337e 48%, #24275c 100%);
    box-shadow: 0 8px 24px rgba(36, 39, 92, .35);
}
.xy-gcal-mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.xy-gcal-mini-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .5px;
}
.xy-gcal .xy-gcal-mini-head button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease;
}
.xy-gcal .xy-gcal-mini-head button:hover:not(:disabled) {
    background: rgba(255, 255, 255, .2);
}
.xy-gcal .xy-gcal-mini-head button:disabled {
    opacity: .3;
    cursor: default;
}
.xy-gcal-mini-week,
.xy-gcal-mini-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.xy-gcal-mini-week span {
    padding: 4px 0;
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, .55);
}
.xy-gcal-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .38);
    font-size: 15px;
    line-height: 1;
}
.xy-gcal-day.is-past {
    color: rgba(255, 255, 255, .22);
}
/* 今天：橙色描边 */
.xy-gcal-day.is-today {
    box-shadow: inset 0 0 0 2px #f58907;
    color: #fff;
}
/* 有游戏：亮白加粗、可点 */
.xy-gcal .xy-gcal-day.is-has {
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.xy-gcal .xy-gcal-day.is-has.is-past {
    color: rgba(255, 255, 255, .6);
}
.xy-gcal .xy-gcal-day.is-has:hover {
    background: rgba(255, 255, 255, .14);
}
/* 大作：右上角金色星 */
.xy-gcal-day i {
    position: absolute;
    top: -3px;
    right: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe27a 0, #ffbe0b 60%, #f59e0b 100%);
    color: #fff;
    font-size: 8px;
    box-shadow: 0 0 8px rgba(255, 190, 11, .75);
}
/* 选中：橙色实底 */
.xy-gcal .xy-gcal-day.is-sel,
.xy-gcal .xy-gcal-day.is-sel:hover {
    background: linear-gradient(135deg, #f58907 0%, #e67d00 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(245, 137, 7, .55);
}
.xy-gcal .xy-gcal-mini-tbd {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 7px 0;
    border: 1px dashed rgba(255, 255, 255, .25);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
    cursor: pointer;
}
.xy-gcal .xy-gcal-mini-tbd[hidden] {
    display: none;
}
.xy-gcal .xy-gcal-mini-tbd:hover {
    border-color: #f58907;
    color: #fff;
}
.xy-gcal .xy-gcal-mini-tbd.is-sel {
    border-style: solid;
    border-color: transparent;
    background: linear-gradient(135deg, #f58907 0%, #e67d00 100%);
    color: #fff;
}
.xy-gcal-mini-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}
.xy-gcal-mini-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.xy-gcal-mini-legend i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    border-radius: 4px;
}
.xy-gcal-mini-legend i.is-has {
    background: rgba(255, 255, 255, .9);
}
.xy-gcal-mini-legend i.is-hot {
    border-radius: 50%;
    background: #ffbe0b;
    color: #fff;
    font-size: 7px;
}
.xy-gcal-mini-legend i.is-today {
    box-shadow: inset 0 0 0 2px #f58907;
}
.xy-gcal .xy-gcal-mini-toggle {
    display: none; /* 折叠按钮只给窄屏，见下面 max-width: 991px */
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(165deg, #2f5596 0%, #33337e 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.xy-gcal .xy-gcal-mini-toggle .fa-chevron-down {
    margin-left: auto;
    font-size: 12px;
    transition: transform .2s ease;
}
.xy-gcal-mini.is-open .xy-gcal-mini-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

/* 按天筛选时右栏顶部的提示条：白底细边框，不用左侧色条 */
.xy-gcal-dayhead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding: 10px 12px 10px 14px;
    border: 1px solid var(--gc-line);
    border-radius: 12px;
    background: var(--gc-card);
}
.xy-gcal-dayhead > i {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #fff1de;
    color: #e67d00;
    font-size: 15px;
}
.dark-open .xy-gcal-dayhead > i {
    background: #4a3214;
    color: #ffb557;
}
.xy-gcal-dayhead[hidden] {
    display: none;
}
.xy-gcal-dayhead b {
    font-size: 16px;
    color: var(--gc-text);
}
.xy-gcal .xy-gcal-dayclear {
    flex-shrink: 0;
    margin-left: auto;
    padding: 5px 12px;
    border: 1px solid var(--gc-line);
    border-radius: 999px;
    background: var(--gc-card);
    color: var(--gc-text);
    font-size: 13px;
    cursor: pointer;
}
.xy-gcal .xy-gcal-dayclear:hover {
    border-color: #f58907;
    color: #c56a00;
}

/* 窄屏（含平板）：月历收起，点「按日期查看」展开 */
@media (max-width: 991px) {
    .xy-gcal-side {
        margin-bottom: 8px;
    }
    .xy-gcal-side .xy-gcal-bar {
        margin: 0;
    }
    .xy-gcal-mini-box {
        display: none;
        margin-top: 8px;
    }
    .xy-gcal-mini.is-open .xy-gcal-mini-box {
        display: block;
    }
    .xy-gcal .xy-gcal-mini-toggle {
        display: flex;
    }
    .xy-gcal-siderank {
        display: none;
    }
    .xy-gcal-day {
        height: 40px;
    }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 767px) {
    .xy-gcal {
        padding-top: 14px;
    }
    .xy-gcal-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 18px;
    }
    .xy-gcal-hero h1 {
        font-size: 23px;
    }
    .xy-gcal-stats li {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
    }
    .xy-gcal-stats b {
        font-size: 18px;
    }
    .xy-gcal-pager a {
        flex: 1;
        text-align: center;
    }
    .xy-gcal-bar {
        padding: 12px;
    }
    .xy-gcal-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .xy-gcal .xy-gcal-chip {
        flex-shrink: 0;
        padding: 5px 13px;
        font-size: 13px;
    }
    .xy-gcal-h {
        font-size: 18px;
    }
    .xy-gcal-grid,
    .xy-gcal-grid.is-focus {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .xy-gcal-body {
        padding: 9px 10px 11px;
    }
    .xy-gcal-name {
        font-size: 14px;
    }
    .xy-gcal-when {
        left: 6px;
        top: 6px;
        min-width: 40px;
        padding: 3px 6px 4px;
    }
    .xy-gcal-when b {
        font-size: 17px;
    }
    .xy-gcal-when i {
        font-size: 10px;
    }
    .xy-gcal-ph b {
        font-size: 20px;
    }
    .xy-gcal-months {
        scrollbar-width: none;
    }
    .xy-gcal-months::-webkit-scrollbar,
    .xy-gcal-filters::-webkit-scrollbar {
        display: none;
    }
    .xy-gcal-foot {
        flex-wrap: wrap;
        gap: 4px 6px;
    }
    .xy-gcal-acts {
        flex-direction: column;
        gap: 6px;
    }
    .xy-gcal .xy-gcal-btn {
        font-size: 12px;
    }
    .xy-gcal-rankitem {
        flex-wrap: wrap;
        gap: 8px 10px;
        padding: 10px 6px;
    }
    .xy-gcal-rankcover {
        width: 92px;
    }
    .xy-gcal-rankmain {
        flex-basis: calc(100% - 140px);
    }
    .xy-gcal-rankcount {
        flex-direction: row;
        align-items: baseline;
        gap: 4px;
        margin-left: 38px;
    }
    .xy-gcal-rankcount b {
        font-size: 16px;
    }
    .xy-gcal-rankact {
        width: auto;
        margin-left: auto;
    }
    .xy-gcal-rankact .xy-gcal-btn {
        display: inline-block;
        width: auto;
        padding: 5px 16px;
        white-space: nowrap;
    }
}

/* 宽屏但窗口很矮（笔记本 768 高等）：左栏放不下排行，排行收回成入口，保证左栏整列固定不出滚动条 */
@media (min-width: 992px) and (max-height: 760px) {
    .xy-gcal-siderank {
        display: none;
    }
    .xy-gcal .xy-gcal-rankbtn.is-narrow-only {
        display: flex !important;
    }
}

/* 宽屏左栏压紧一点给排行腾高度。必须写在文件最后：上面月历 / 分组按钮的基础规则同权重，写在前面会被覆盖 */
@media (min-width: 992px) {
    .xy-gcal-mini-box {
        padding: 12px 12px 10px;
    }
    .xy-gcal-mini-head {
        margin-bottom: 4px;
    }
    .xy-gcal-day {
        height: 31px;
    }
    .xy-gcal-mini-legend {
        margin-top: 8px;
    }
    .xy-gcal .xy-gcal-mini-tbd {
        margin-top: 6px;
        padding: 5px 0;
    }
    .xy-gcal .xy-gcal-view {
        gap: 0;
        padding: 5px 4px;
    }
    .xy-gcal-view b {
        font-size: 12px;
    }
    .xy-gcal-view em {
        font-size: 15px;
    }
    .xy-gcal-side .xy-gcal-bar {
        padding: 12px 14px;
    }
}
