/* 奖项铭牌：视觉移植自 next.tboj.cn 的 award-honor 组件 */
.zk-award {
    --plate-height: 1em;
    vertical-align: middle;
    height: var(--plate-height);
    width: calc(var(--plate-height) * 3.8);
    isolation: isolate;
    flex: none;
    display: inline-flex;
    position: relative;
    overflow: hidden;
    margin-inline-start: .3em;
}
.zk-award img { object-fit: contain; width: 100%; height: 100%; display: block; }

.zk-award[data-series="csp-j"][data-rank="2"] img { filter: saturate(.52) contrast(.94); }
.zk-award[data-series="csp-j"][data-rank="1"] img { filter: saturate(.82); }
.zk-award[data-series="csp-s"][data-rank="2"] img { filter: saturate(.7); }
.zk-award[data-series="noip"][data-rank="2"] img { filter: saturate(.88); }
.zk-award[data-rank="silver"] img { filter: grayscale() brightness(1.13); }

.zk-award[data-rank="gold"] { --metal-face: linear-gradient(110deg, #755115ed 4%, #835919e6 39%, #805312a8 61%, transparent 80%); }
.zk-award[data-rank="silver"] { --metal-face: linear-gradient(110deg, #aaa 3%, #e0e0e0 31%, #c7c7c7 52%, #a8a8a8 68%, transparent 82%); }
.zk-award[data-rank="bronze"] { --metal-face: linear-gradient(110deg, #603320ed 4%, #82432be6 39%, #75371ba8 61%, transparent 80%); }
.zk-award:is([data-rank="gold"], [data-rank="silver"], [data-rank="bronze"])::before {
    content: "";
    z-index: 1;
    clip-path: polygon(8% 11%, 96% 11%, 96% 69%, 91% 88%, 4% 88%, 4% 31%);
    background: var(--metal-face);
    pointer-events: none;
    position: absolute;
    inset: 0;
}

.zk-award__caption {
    z-index: 2;
    color: #fff8eb;
    font: italic 800 calc(var(--plate-height) * .74) / 1 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: -.03em;
    white-space: nowrap;
    text-shadow: 0 1px 1px #0005;
    pointer-events: none;
    align-items: center;
    display: inline-flex;
    position: absolute;
    inset: 0 auto 0 7%;
}
.zk-award[data-rank="silver"] .zk-award__caption { color: #252525; text-shadow: none; }

@media (prefers-reduced-motion: no-preference) {
    .zk-award:is([data-rank="1"], [data-rank="2"], [data-rank="gold"], [data-rank="silver"], [data-rank="bronze"])::after {
        content: "";
        z-index: 1;
        clip-path: polygon(63% 9%, 97% 9%, 97% 67%, 91% 90%, 58% 90%);
        background: linear-gradient(112deg, transparent 42%, rgba(255, 255, 255, .92) 50%, transparent 58%) 128% 0 / 250% 100% no-repeat;
        opacity: .55;
        animation: zk-award-sweep 5.8s ease-in-out infinite;
        pointer-events: none;
        position: absolute;
        inset: 0;
    }
    .zk-award[data-series="noi"]::after { animation-duration: 4.2s; opacity: .8; }
    .zk-award[data-rank="gold"]::after { animation-duration: 6.5s; }
}
@keyframes zk-award-sweep {
    0% { background-position-x: 128%; }
    52%, 100% { background-position-x: -28%; }
}

/* 非 CSP / NOI / NOIP 奖项认证：沿用黄色对勾 */
.zk-cert {
    vertical-align: middle;
    flex: none;
    margin-inline-start: .3em;
    margin-bottom: 2px;
    display: inline-block;
}

/* 教练铭牌：管理员权限用户 */
.zk-coach {
    --medal-shape: polygon(9% 0, 100% 0, 100% 72%, 91% 100%, 0 100%, 0 28%);
    isolation: isolate;
    height: 1.33em;
    clip-path: var(--medal-shape);
    color: #f1f5fb;
    white-space: nowrap;
    background: linear-gradient(125deg, #697789, #c7d4e3 17%, #4e5a6a 42%, #1f2732 71%, #9bb0c6 93%);
    flex: none;
    align-items: center;
    gap: .34em;
    padding: 0 .83em 0 .52em;
    font-size: .76em;
    font-weight: 750;
    line-height: 1;
    display: inline-flex;
    position: relative;
    margin-inline-start: .3em;
    vertical-align: middle;
}
.zk-coach::before,
.zk-coach::after { z-index: -1; content: ""; position: absolute; }
.zk-coach::before {
    clip-path: var(--medal-shape);
    background: linear-gradient(165deg, #202832 0%, #0c1017 52%, #06080d 100%);
    inset: 1px;
}
.zk-coach::after {
    clip-path: polygon(72% 0, 100% 0, 100% 100%, 2% 100%);
    background: linear-gradient(144deg, #657686 14%, #24303d 49%, #7d95ae 52%, #263443 58%, #141d28 100%);
    width: 1.15em;
    top: 0;
    bottom: 0;
    right: 0;
}
.zk-coach svg { color: #c6d6e9; flex: none; height: .98em; width: .98em; }
.zk-coach__sweep {
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(110deg, #0000 24%, #6ba6e037 43%, #bfe4ff45 50%, #6ba6e028 54%, #0000 64%);
    animation: 6s cubic-bezier(.22, .61, .36, 1) infinite zk-coach-sweep;
    position: absolute;
    left: 0;
    right: 0;
    top: 1px;
    bottom: 1px;
}
@keyframes zk-coach-sweep {
    0% { transform: translate(-100%); }
    30%, 100% { transform: translate(100%); }
}
@media (prefers-reduced-motion: reduce) {
    .zk-coach__sweep { display: none; }
}