/* Competition Platform Week 5 v0.5.0 */

.cpw1,
.cpw1 *,
.cpw1-single,
.cpw1-single * {
    box-sizing: border-box;
}

.cpw1,
.cpw1-single {
    color: #26354d;
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.cpw1 {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    max-width: none;
    margin-right: -50vw;
    margin-left: -50vw;
}

.cpw1-container {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
}

.cpw1-hero {
    padding: 62px 0 56px;
    background:
        radial-gradient(circle at 12% 10%, rgba(82, 159, 76, .20), transparent 28%),
        radial-gradient(circle at 88% 20%, rgba(244, 167, 53, .20), transparent 26%),
        linear-gradient(135deg, #edf8ff, #fff9ed 50%, #f6f1ff);
}

.cpw1-hero-grid {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 72px;
    align-items: center;
}

.cpw1-hero-copy {
    padding-top: 8px;
}

.cpw1-eyebrow,
.cpw1-heading > span {
    color: var(--cpw-accent, #2f6935);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .08em;
}

.cpw1 h1 {
    margin: 12px 0 0;
    font-size: clamp(44px, 5vw, 74px);
    line-height: 1.12;
}

.cpw1-hero p {
    max-width: 680px;
    margin: 20px 0 30px;
    color: #6f7d91;
    font-size: 19px;
    line-height: 1.9;
}

.cpw1-btn {
    display: inline-flex;
    min-height: 50px;
    padding: 0 26px;
    align-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #4f9c48, var(--cpw-accent, #2f6935));
    box-shadow: 0 12px 24px rgba(47, 105, 53, .22);
    text-decoration: none;
    font-weight: 900;
}

.cpw1-visual {
    position: relative;
    min-height: 330px;
}

.cpw1-trophy {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 184px;
    height: 184px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: linear-gradient(145deg, #fff2ab, #ffd05e);
    box-shadow: 0 24px 52px rgba(170, 120, 20, .22);
    font-size: 94px;
}

.cpw1-tag {
    position: absolute;
    padding: 19px 24px;
    border-radius: 20px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 15px 38px rgba(38,53,77,.12);
    font-weight: 900;
}

.tag-1 {
    left: 2%;
    top: 58px;
    border-top: 5px solid #4f9c48;
    transform: rotate(-3deg);
}

.tag-2 {
    right: 2%;
    top: 74px;
    border-top: 5px solid #f4a735;
    transform: rotate(3deg);
}

.tag-3 {
    left: 50%;
    bottom: 6px;
    border-top: 5px solid #7f65bf;
    transform: translateX(-50%) rotate(-1deg);
}

.cpw1-browser {
    padding: 72px 0 92px;
    background: #f5f8fc;
}

.cpw1-heading h2 {
    margin: 8px 0;
    font-size: clamp(32px, 4vw, 46px);
}

.cpw1-heading p {
    margin: 0;
    color: #6f7d91;
}

.cpw1-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 30px 0;
}

.cpw1-tabs button,
.cpw1-sidebar button,
.cpw2-more-wrap button,
.cpw1-play,
.cpw2-modal-close {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.cpw1-tabs button {
    min-height: 56px;
    padding: 12px 16px;
    border: 1px solid #e4eaf2;
    border-radius: 14px;
    color: #26354d;
    background: #fff;
    font-weight: 900;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.cpw1-tabs button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(38, 53, 77, .08);
}

.cpw1-tabs button.active {
    color: #fff;
    background: var(--cpw-accent, #2f6935);
    border-color: var(--cpw-accent, #2f6935);
}

.cpw1-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.cpw1-content {
    min-width: 0;
}

.cpw1-sidebar {
    align-self: start;
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(38,53,77,.07);
}

.cpw1-filter-group + .cpw1-filter-group {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e4eaf2;
}

.cpw1-filter-group h3 {
    margin: 0 0 12px;
    font-size: 20px;
}

.cpw1-filter-group button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 11px 10px;
    border-radius: 10px;
    color: #26354d;
    background: #f6f9fc;
    text-align: left;
    font-weight: 800;
}

.cpw1-filter-group button:hover,
.cpw1-filter-group button.active {
    color: var(--cpw-accent, #2f6935);
    background: #eaf6e9;
}

.cpw1-filter-group small {
    color: #6f7d91;
    font-size: 11px;
}

.cpw2-toolbar {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cpw2-toolbar > div:first-child {
    display: grid;
    gap: 3px;
}

.cpw2-toolbar strong {
    font-size: 24px;
}

.cpw2-toolbar span {
    color: #6f7d91;
    font-size: 13px;
}

.cpw2-controls {
    display: flex;
    gap: 10px;
}

.cpw2-controls input,
.cpw2-controls select {
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid #e4eaf2;
    border-radius: 11px;
    color: #26354d;
    background: #fff;
}

.cpw2-controls input {
    width: 260px;
}

.cpw1-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cpw1-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(38,53,77,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.cpw1-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(38,53,77,.13);
}

.cpw1-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e8eef4;
}

.cpw1-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.cpw1-card:hover .cpw1-image img {
    transform: scale(1.04);
}

.cpw1-type,
.cpw1-award {
    position: absolute;
    top: 11px;
    z-index: 2;
    max-width: calc(50% - 16px);
    overflow: hidden;
    padding: 6px 9px;
    border-radius: 999px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 900;
}

.cpw1-type {
    left: 11px;
    color: #fff;
    background: #26354d;
}

.cpw1-award {
    right: 11px;
    color: #6a4700;
    background: #ffd05e;
}

.cpw1-play {
    position: absolute;
    top: 106px;
    left: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #26354d;
    background: rgba(255,255,255,.95);
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
    font-size: 16px;
}

.cpw1-play:hover {
    transform: translate(-50%, -50%) scale(1.07);
}

.cpw1-body {
    display: flex;
    min-height: 178px;
    padding: 18px;
    flex-direction: column;
}

.cpw1-card-year {
    color: var(--cpw-accent, #2f6935);
    font-size: 12px;
    font-weight: 900;
}

.cpw1-body h3 {
    min-height: 52px;
    margin: 7px 0 12px;
    font-size: 19px;
    line-height: 1.45;
}

.cpw1-body h3 a,
.cpw1-link {
    color: inherit;
    text-decoration: none;
}

.cpw1-meta {
    min-height: 46px;
}

.cpw1-meta p {
    display: flex;
    gap: 8px;
    margin: 5px 0 0;
    color: #6f7d91;
    font-size: 13px;
}

.cpw1-meta strong {
    min-width: 48px;
    color: #26354d;
}

.cpw1-link {
    display: inline-block;
    margin-top: auto;
    padding-top: 15px;
    color: var(--cpw-accent, #2f6935);
    font-size: 13px;
    font-weight: 900;
}

.cpw2-status {
    padding: 48px 20px;
    text-align: center;
    color: #6f7d91;
}

.cpw2-more-wrap {
    margin-top: 28px;
    text-align: center;
}

.cpw2-more-wrap button {
    min-height: 46px;
    padding: 0 24px;
    border: 1px solid #dbe4ed;
    border-radius: 999px;
    color: var(--cpw-accent, #2f6935);
    background: #fff;
    font-weight: 900;
}

.cpw2-more-wrap button:hover {
    background: #eaf6e9;
}

.cpw2-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.cpw2-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .80);
}

.cpw2-modal-dialog {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(960px, calc(100% - 32px));
    transform: translate(-50%, -50%);
}

.cpw2-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.16);
    font-size: 27px;
}

.cpw2-modal-frame {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    border-radius: 18px;
    background: #000;
}

.cpw2-modal-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 單一作品頁 */
.cpw1-single-hero {
    padding: 64px 0 72px;
    background: linear-gradient(135deg, #eef8ff, #fff8eb 52%, #f5f0ff);
}

.cpw1-back-form {
    position: relative;
    z-index: 999999;
    display: inline-block;
    margin: 0 0 24px;
    pointer-events: auto !important;
}

.cpw1-back {
    position: relative;
    z-index: 999999;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    color: var(--cpw-accent, #2f6935);
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    line-height: 1.5;
    cursor: pointer;
    pointer-events: auto !important;
    appearance: none;
    -webkit-appearance: none;
}

.cpw1-back:hover,
.cpw1-back:focus {
    color: #1f5728;
    text-decoration: underline;
}

.cpw1-single-grid {
    display: grid;
    grid-template-columns: 1.06fr .94fr;
    gap: 48px;
    align-items: center;
}

.cpw1-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cpw1-chips span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--cpw-accent, #2f6935);
    background: #edf7ec;
    font-size: 12px;
    font-weight: 900;
}

.cpw1-chips .cpw1-chip-award {
    color: #6a4700;
    background: #ffd05e;
}

.cpw1-single h1 {
    margin: 18px 0;
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.2;
}

.cpw1-single-meta {
    display: grid;
    gap: 8px;
}

.cpw1-single-meta p {
    display: flex;
    gap: 16px;
    margin: 0;
    color: #6f7d91;
}

.cpw1-single-meta strong {
    min-width: 86px;
    color: #26354d;
}

.cpw1-single-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(38,53,77,.15);
}

.cpw1-single-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: cover;
}

.cpw1-single-content {
    padding: 76px 0 96px;
}

.cpw1-section + .cpw1-section {
    margin-top: 58px;
}

.cpw1-section h2 {
    margin: 0 0 20px;
    font-size: 30px;
}

.cpw1-video {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    border-radius: 22px;
    background: #000;
}

.cpw1-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cpw1-description {
    color: #42516a;
    font-size: 17px;
    line-height: 1.95;
}

.cpw1-comment {
    padding: 32px;
    border: 1px solid #f4e2ae;
    border-radius: 20px;
    background: #fff9e9;
}

.cpw1-comment p {
    margin: 0;
    color: #66572b;
    font-size: 17px;
    line-height: 1.9;
}

@media (max-width: 1180px) {
    .cpw1-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 940px) {
    .cpw1-hero-grid,
    .cpw1-single-grid,
    .cpw1-layout {
        grid-template-columns: 1fr;
    }

    .cpw1-visual {
        max-width: 650px;
        width: 100%;
        margin: 0 auto;
    }

    .cpw1-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cpw1-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .cpw1-filter-group + .cpw1-filter-group {
        margin: 0;
        padding: 0 0 0 18px;
        border-top: 0;
        border-left: 1px solid #e4eaf2;
    }

    .cpw2-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 650px) {
    .cpw1-container {
        width: min(100% - 28px, 1320px);
    }

    .cpw1-hero {
        padding: 54px 0;
    }

    .cpw1-visual {
        min-height: 320px;
    }

    .cpw1-trophy {
        width: 124px;
        height: 124px;
        font-size: 62px;
    }

    .cpw1-tag {
        padding: 14px 16px;
        font-size: 14px;
    }

    .cpw1-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cpw1-grid {
        grid-template-columns: 1fr;
    }

    .cpw1-sidebar {
        grid-template-columns: 1fr;
    }

    .cpw1-filter-group + .cpw1-filter-group {
        padding: 18px 0 0;
        border-left: 0;
        border-top: 1px solid #e4eaf2;
    }

    .cpw2-controls {
        flex-direction: column;
    }

    .cpw2-controls input,
    .cpw2-controls select {
        width: 100%;
    }

    .cpw1-body {
        min-height: 0;
    }

    .cpw1-body h3,
    .cpw1-meta {
        min-height: 0;
    }
}


/* 第三週：Banner 圖片、統計與精選作品 */
.cpw3-hero-media {
    overflow: hidden;
    min-height: 330px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 24px 54px rgba(38, 53, 77, .14);
}

.cpw3-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    display: block;
    object-fit: cover;
}

.cpw3-stats {
    position: relative;
    z-index: 3;
    margin-top: -28px;
}

.cpw3-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.cpw3-stat {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 13px;
    padding: 20px 22px;
    border: 1px solid rgba(228, 234, 242, .85);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 15px 34px rgba(38, 53, 77, .09);
}

.cpw3-stat > span {
    grid-row: 1 / 3;
    align-self: center;
    font-size: 30px;
}

.cpw3-stat strong {
    font-size: 27px;
    line-height: 1.1;
}

.cpw3-stat small {
    margin-top: 3px;
    color: #6f7d91;
    font-size: 13px;
}

.cpw3-featured {
    padding: 74px 0 34px;
    background: #fff;
}

.cpw3-section-heading {
    margin-bottom: 24px;
}

.cpw3-section-heading > span {
    color: var(--cpw-accent, #2f6935);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .08em;
}

.cpw3-section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 44px);
}

.cpw3-featured-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(310px, 34%);
    gap: 18px;
    overflow-x: auto;
    padding: 2px 2px 16px;
    scroll-snap-type: x mandatory;
}

.cpw3-featured-card {
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid #e4eaf2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 13px 30px rgba(38, 53, 77, .08);
}

.cpw3-featured-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.cpw3-featured-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.cpw3-featured-card:hover .cpw3-featured-image img {
    transform: scale(1.04);
}

.cpw3-featured-award {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #6a4700;
    background: linear-gradient(135deg, #ffe989, #ffc947);
    font-size: 12px;
    font-weight: 900;
}

.cpw3-featured-play {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 50%;
    color: #26354d;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 9px 22px rgba(0, 0, 0, .18);
    cursor: pointer;
}

.cpw3-featured-body {
    padding: 18px;
}

.cpw3-featured-body > span {
    color: var(--cpw-accent, #2f6935);
    font-size: 12px;
    font-weight: 900;
}

.cpw3-featured-body h3 {
    margin: 7px 0;
    font-size: 19px;
    line-height: 1.45;
}

.cpw3-featured-body h3 a {
    color: inherit;
    text-decoration: none;
}

.cpw3-featured-body p {
    margin: 0;
    color: #6f7d91;
    font-size: 13px;
}

@media (max-width: 940px) {
    .cpw3-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cpw3-featured-track {
        grid-auto-columns: minmax(300px, 58%);
    }
}

@media (max-width: 650px) {
    .cpw3-stats {
        margin-top: -18px;
    }

    .cpw3-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .cpw3-stat {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 16px;
        text-align: center;
    }

    .cpw3-stat > span {
        grid-row: auto;
        font-size: 25px;
    }

    .cpw3-stat strong {
        margin-top: 5px;
        font-size: 23px;
    }

    .cpw3-featured {
        padding-top: 58px;
    }

    .cpw3-featured-track {
        grid-auto-columns: 86%;
    }
}


/* 第四週：前台投稿 */
.cpw4-submission,
.cpw4-ranking-standalone {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    padding: 72px 0 92px;
    color: #26354d;
    background: #f5f8fc;
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.cpw4-form-heading,
.cpw4-ranking-heading {
    margin-bottom: 26px;
}

.cpw4-form-heading > span,
.cpw4-ranking-heading > span {
    color: var(--cpw-accent, #2f6935);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .08em;
}

.cpw4-form-heading h1,
.cpw4-ranking-heading h2 {
    margin: 8px 0;
    font-size: clamp(32px, 4vw, 48px);
}

.cpw4-form-heading p {
    max-width: 760px;
    margin: 0;
    color: #6f7d91;
    line-height: 1.8;
}

.cpw4-form {
    max-width: 920px;
    padding: 30px;
    border: 1px solid #e4eaf2;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(38, 53, 77, .08);
}

.cpw4-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cpw4-field {
    display: grid;
    gap: 7px;
}

.cpw4-field-full {
    grid-column: 1 / -1;
}

.cpw4-field > span {
    font-weight: 900;
}

.cpw4-field b {
    color: #c0392b;
}

.cpw4-field input,
.cpw4-field select,
.cpw4-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #dbe4ed;
    border-radius: 11px;
    color: #26354d;
    background: #fff;
    font: inherit;
}

.cpw4-field textarea {
    min-height: 170px;
    resize: vertical;
}

.cpw4-field small {
    color: #6f7d91;
}

.cpw4-consent {
    display: flex;
    gap: 9px;
    margin: 22px 0;
    align-items: flex-start;
    color: #56647a;
    line-height: 1.6;
}

.cpw4-submit-button {
    min-height: 48px;
    padding: 0 25px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--cpw-accent, #2f6935);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.cpw4-honeypot {
    position: absolute;
    left: -99999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cpw4-notice {
    max-width: 920px;
    margin-bottom: 20px;
    padding: 15px 18px;
    border-radius: 12px;
    font-weight: 800;
}

.cpw4-notice-success {
    color: #245d2c;
    background: #e9f7e8;
    border: 1px solid #bfe0be;
}

.cpw4-notice-error {
    color: #8b2e26;
    background: #fff0ee;
    border: 1px solid #efc0bb;
}

/* 第四週：排行榜 */
.cpw4-ranking-home {
    padding: 72px 0;
    background: #fff;
}

.cpw4-ranking-table {
    display: grid;
    gap: 12px;
}

.cpw4-ranking-row {
    display: grid;
    grid-template-columns: 54px 100px minmax(0, 1fr) 150px;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid #e4eaf2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(38, 53, 77, .06);
}

.cpw4-rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--cpw-accent, #2f6935);
    font-size: 19px;
}

.cpw4-ranking-row:nth-child(1) .cpw4-rank-number {
    color: #6a4700;
    background: #ffd05e;
}

.cpw4-ranking-row:nth-child(2) .cpw4-rank-number {
    color: #4f5965;
    background: #dce3ea;
}

.cpw4-ranking-row:nth-child(3) .cpw4-rank-number {
    color: #70411f;
    background: #e6b483;
}

.cpw4-ranking-row > img {
    width: 100px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

.cpw4-rank-info h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.cpw4-rank-info h3 a {
    color: inherit;
    text-decoration: none;
}

.cpw4-rank-info p {
    margin: 0;
    color: #6f7d91;
    font-size: 13px;
}

.cpw4-rank-score {
    display: grid;
    justify-items: end;
}

.cpw4-rank-score strong {
    color: var(--cpw-accent, #2f6935);
    font-size: 28px;
}

.cpw4-rank-score span,
.cpw4-rank-score small {
    color: #6f7d91;
    font-size: 12px;
}

.cpw4-ranking-empty {
    padding: 44px 20px;
    border-radius: 16px;
    color: #6f7d91;
    background: #f7f9fc;
    text-align: center;
}

@media (max-width: 760px) {
    .cpw4-form-grid {
        grid-template-columns: 1fr;
    }

    .cpw4-field-full {
        grid-column: auto;
    }

    .cpw4-form {
        padding: 22px;
    }

    .cpw4-ranking-row {
        grid-template-columns: 44px 74px minmax(0, 1fr);
    }

    .cpw4-ranking-row > img {
        width: 74px;
        height: 54px;
    }

    .cpw4-rank-score {
        grid-column: 2 / 4;
        justify-items: start;
        padding-left: 0;
    }
}


/* 第五週：得獎公告、排行、年度統計與教師成果 */
.cpw5-section,
.cpw5-home-awards {
    padding: 72px 0;
    color: #26354d;
    background: #fff;
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.cpw5-section {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    background: #f5f8fc;
}

.cpw5-home-awards {
    background: linear-gradient(180deg, #fffdf5, #fff);
}

.cpw5-heading {
    margin-bottom: 26px;
}

.cpw5-heading > span {
    color: var(--cpw-accent, #2f6935);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .08em;
}

.cpw5-heading h2 {
    margin: 8px 0;
    font-size: clamp(32px, 4vw, 46px);
}

.cpw5-heading p {
    margin: 0;
    color: #6f7d91;
    line-height: 1.8;
}

.cpw5-awards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.cpw5-award-card {
    overflow: hidden;
    border: 1px solid #e4eaf2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(38, 53, 77, .08);
}

.cpw5-award-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.cpw5-award-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.cpw5-award-card:hover .cpw5-award-image img {
    transform: scale(1.04);
}

.cpw5-medal {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}

.cpw5-medal-gold {
    color: #6a4700;
    background: linear-gradient(135deg, #fff0a2, #ffc947);
}

.cpw5-medal-silver {
    color: #43505d;
    background: linear-gradient(135deg, #f4f6f8, #cbd4dc);
}

.cpw5-medal-bronze {
    color: #6f3c1e;
    background: linear-gradient(135deg, #f3c494, #c98a51);
}

.cpw5-medal-merit {
    color: #4c3f75;
    background: linear-gradient(135deg, #eee7ff, #cfc0ff);
}


.cpw5-medal-popularity {
    color: #8a2857;
    background: linear-gradient(135deg, #ffe2f0, #ff9fc8);
}

.cpw5-award-body {
    padding: 17px;
}

.cpw5-award-body > span {
    color: var(--cpw-accent, #2f6935);
    font-size: 12px;
    font-weight: 900;
}

.cpw5-award-body h3 {
    margin: 7px 0;
    font-size: 18px;
    line-height: 1.45;
}

.cpw5-award-body h3 a {
    color: inherit;
    text-decoration: none;
}

.cpw5-award-body p {
    min-height: 20px;
    margin: 0;
    color: #6f7d91;
    font-size: 13px;
}

.cpw5-award-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.cpw5-award-actions a,
.cpw5-single-certificate a {
    display: inline-flex;
    min-height: 36px;
    padding: 0 12px;
    align-items: center;
    border-radius: 999px;
    color: var(--cpw-accent, #2f6935);
    background: #edf7ec;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.cpw5-single-certificate {
    margin: -4px 0 18px;
}

.cpw5-ranking-table {
    display: grid;
    gap: 11px;
}

.cpw5-ranking-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 120px;
    gap: 16px;
    align-items: center;
    padding: 15px 18px;
    border: 1px solid #e4eaf2;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(38, 53, 77, .06);
}

.cpw5-ranking-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--cpw-accent, #2f6935);
    font-size: 18px;
}

.cpw5-ranking-row:nth-child(1) .cpw5-ranking-number {
    color: #6a4700;
    background: #ffd05e;
}

.cpw5-ranking-row:nth-child(2) .cpw5-ranking-number {
    color: #45515c;
    background: #dce3ea;
}

.cpw5-ranking-row:nth-child(3) .cpw5-ranking-number {
    color: #70411f;
    background: #e6b483;
}

.cpw5-ranking-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.cpw5-ranking-info p {
    margin: 0;
    color: #6f7d91;
    font-size: 13px;
}

.cpw5-ranking-points {
    display: grid;
    justify-items: end;
}

.cpw5-ranking-points strong {
    color: var(--cpw-accent, #2f6935);
    font-size: 27px;
}

.cpw5-ranking-points span {
    color: #6f7d91;
    font-size: 12px;
}

.cpw5-year-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cpw5-year-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 22px;
    border: 1px solid #e4eaf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(38, 53, 77, .07);
}

.cpw5-year-card h3 {
    grid-column: 1 / -1;
    margin: 0 0 8px;
    color: var(--cpw-accent, #2f6935);
    font-size: 24px;
}

.cpw5-year-card div {
    display: grid;
    padding: 12px;
    border-radius: 12px;
    background: #f6f9fc;
}

.cpw5-year-card strong {
    font-size: 24px;
}

.cpw5-year-card span {
    color: #6f7d91;
    font-size: 12px;
}

.cpw5-teacher-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cpw5-teacher-card {
    position: relative;
    padding: 22px;
    border: 1px solid #e4eaf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(38, 53, 77, .07);
}

.cpw5-teacher-rank {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--cpw-accent, #2f6935);
    font-weight: 900;
}

.cpw5-teacher-card h3 {
    margin: 0 0 7px;
    font-size: 22px;
}

.cpw5-teacher-card > p {
    min-height: 40px;
    margin: 0;
    color: #6f7d91;
    font-size: 13px;
    line-height: 1.6;
}

.cpw5-teacher-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cpw5-teacher-stats span {
    padding: 7px 9px;
    border-radius: 9px;
    background: #f3f7fb;
    color: #5e6a7d;
    font-size: 12px;
}

.cpw5-teacher-stats strong {
    color: #26354d;
}

.cpw5-empty {
    padding: 48px 20px;
    border-radius: 16px;
    color: #6f7d91;
    background: #fff;
    text-align: center;
}

@media (max-width: 1120px) {
    .cpw5-awards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .cpw5-awards-grid,
    .cpw5-year-grid,
    .cpw5-teacher-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .cpw5-awards-grid,
    .cpw5-year-grid,
    .cpw5-teacher-grid {
        grid-template-columns: 1fr;
    }

    .cpw5-ranking-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .cpw5-ranking-points {
        grid-column: 2 / 3;
        justify-items: start;
    }
}


.cpw1-video-fallback {
    margin: 0;
    padding: 24px;
    border: 1px solid #e4eaf2;
    border-radius: 16px;
    background: #f7f9fc;
}

.cpw1-video-fallback a {
    color: var(--cpw-accent, #2f6935);
    font-weight: 900;
    text-decoration: none;
}


.cpw1-youtube-help {
    margin: 12px 0 0;
    color: #6f7d91;
    font-size: 13px;
    line-height: 1.7;
}

.cpw1-youtube-help a {
    margin-left: 6px;
    color: var(--cpw-accent, #2f6935);
    font-weight: 900;
    text-decoration: none;
}


/* v0.5.10：年度折疊與正確篩選數量 */
.cpw1-filter-group-heading {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    color: #26354d;
    background: transparent;
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.cpw1-filter-chevron {
    font-size: 18px;
    line-height: 1;
}

.cpw1-filter-group-body[hidden],
.cpw1-year-extra[hidden] {
    display: none !important;
}

.cpw1-year-more-toggle {
    justify-content: center !important;
    margin-top: 6px !important;
    color: var(--cpw-accent, #2f6935) !important;
    background: transparent !important;
    border: 1px dashed #cdd9cf !important;
    font-weight: 800 !important;
}


/* v0.5.14 老師評語 */
.cpw5-teacher-comment {
    position: relative;
    overflow: hidden;
    padding: 28px 30px;
    border: 1px solid #dcebdc;
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% 12%, rgba(255, 213, 91, .20), transparent 24%),
        linear-gradient(135deg, #f6fbf4, #fffdf5);
    box-shadow: 0 12px 30px rgba(47, 105, 53, .08);
}

.cpw5-teacher-comment-heading {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.cpw5-teacher-comment-heading > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e7f4e4;
    font-size: 20px;
}

.cpw5-teacher-comment-heading h2 {
    margin: 0;
}

.cpw5-teacher-comment-content {
    color: #3f4c43;
    font-size: 17px;
    line-height: 1.95;
}

.cpw5-teacher-comment-content p {
    margin: 0 0 12px;
}

.cpw5-teacher-comment-content p:last-child {
    margin-bottom: 0;
}

.cpw5-teacher-comment-signature {
    margin: 18px 0 0;
    color: var(--cpw-accent, #2f6935);
    font-size: 14px;
    font-weight: 900;
    text-align: right;
}

@media (max-width: 620px) {
    .cpw5-teacher-comment {
        padding: 22px 20px;
    }
}
