:root {
    --navy: #16324F;
    --navy-deep: #0E2438;
    --gold: #E8B86D;
    --gold-deep: #C9954A;
    --cream: #F7F3EC;
    --card: #FFFFFF;
    --text: #1E2A36;
    --muted: #5C6B7A;
    --line: rgba(22, 50, 79, 0.12);
    --shadow: rgba(14, 36, 56, 0.12);
    --nav-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
    font-family: 'Noto Sans TC', '微軟正黑體', 'Microsoft JhengHei', sans-serif;
    line-height: 1.75;
    color: var(--text);
    background: var(--cream);
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 36px;
    letter-spacing: 0.06em;
}

.section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin: 14px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), var(--gold-deep));
}

.subsection-title {
    font-size: 1.35rem;
    color: var(--navy);
    margin: 8px 0 22px;
}

.section-note {
    color: var(--muted);
    margin-bottom: 22px;
}

section {
    padding: 72px 0;
}

/* 導覽列 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px var(--shadow);
    z-index: 1000;
}

.navbar.is-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 18px rgba(14, 36, 56, 0.16);
}

.nav-container {
    max-width: 1120px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-logo i {
    color: var(--gold-deep);
    font-size: 1.4rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-menu a {
    display: inline-block;
    padding: 6px 10px;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 999px;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    background: rgba(232, 184, 109, 0.28);
    outline: none;
}

.nav-cta {
    background: var(--navy);
    color: #fff !important;
    font-weight: 700 !important;
}

.nav-cta:hover,
.nav-cta:focus-visible {
    background: var(--gold-deep) !important;
    color: var(--navy-deep) !important;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 主視覺 */
.hero {
    padding: calc(var(--nav-height) + 28px) 0 12px;
}

.hero-banner {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 28px;
    box-shadow: 0 18px 40px var(--shadow);
}

/* 主協辦 */
.organizers {
    padding-top: 48px;
}

.organizer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.organizer-card {
    background: var(--card);
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 8px 24px var(--shadow);
    border-top: 4px solid var(--gold);
}

.organizer-card h3 {
    color: var(--gold-deep);
    margin-bottom: 10px;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.organizer-card p {
    font-size: 1.05rem;
    font-weight: 500;
}

/* 宗旨 */
.about {
    background:
        radial-gradient(circle at 8% 20%, rgba(232, 184, 109, 0.28), transparent 32%),
        linear-gradient(180deg, #fff, var(--cream));
}

.about-panel {
    max-width: 820px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 22px;
    padding: 36px 40px;
    box-shadow: 0 10px 28px var(--shadow);
}

.about-panel p + p {
    margin-top: 16px;
}

.about-quote {
    color: var(--navy);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    padding-top: 8px;
}

/* 主題 */
.theme-lead {
    max-width: 860px;
    margin: 0 auto 28px;
}

.theme-lead p + p {
    margin-top: 14px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.theme-card {
    background: var(--navy);
    color: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 12px 28px rgba(14, 36, 56, 0.22);
}

.theme-card i {
    color: var(--gold);
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.theme-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.theme-card p {
    color: rgba(255, 255, 255, 0.88);
}

.language-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.language-row span {
    padding: 8px 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
    border: 1px solid var(--line);
}

/* 期程 */
.schedule {
    background: #fff;
}

.timeline {
    position: relative;
    display: grid;
    gap: 18px;
    max-width: 860px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 164px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--gold), var(--navy));
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 36px;
    position: relative;
}

.timeline-date {
    text-align: right;
    font-weight: 700;
    color: var(--gold-deep);
    padding-top: 16px;
}

.timeline-content {
    background: var(--cream);
    border-radius: 16px;
    padding: 16px 20px;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--navy);
}

.timeline-content h3 {
    font-size: 1.05rem;
    color: var(--navy);
}

.timeline-content p {
    color: var(--muted);
}

.location {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
}

.location i {
    color: var(--gold-deep);
}

/* 辦法與評分 */
.rules {
    background: var(--cream);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.rule-item {
    display: flex;
    gap: 14px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 18px var(--shadow);
}

.rule-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.rule-content h3 {
    font-size: 1.05rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.rule-content p {
    color: var(--muted);
}

.scoring-chart {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.score-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-weight: 500;
}

.score-label strong {
    color: var(--gold-deep);
    flex-shrink: 0;
}

.score-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(22, 50, 79, 0.1);
    overflow: hidden;
}

.score-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold), var(--gold-deep));
    transition: width 0.8s ease;
}

.voting-info {
    background: var(--navy);
    color: #fff;
    border-radius: 20px;
    padding: 28px 32px;
}

.voting-info h3 {
    margin-bottom: 8px;
}

.voting-info ul {
    margin: 10px 0 18px 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy-deep);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #f3cb8a;
    outline: none;
}

.btn-secondary {
    background: #fff;
    color: var(--navy);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--gold);
    outline: none;
}

.btn-large {
    padding: 16px 28px;
    font-size: 1.05rem;
}

/* 獎項 */
.prizes {
    background: #fff;
}

.prize-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 24px;
}

.prize-category h3 {
    text-align: center;
    color: var(--navy);
    margin-bottom: 16px;
}

.prize-grid {
    display: grid;
    gap: 14px;
}

.prize-item {
    background: var(--cream);
    border-radius: 16px;
    padding: 22px 18px;
    text-align: center;
    border: 2px solid transparent;
}

.prize-item.first {
    border-color: var(--gold);
    background: linear-gradient(180deg, #fff8ea, #fff);
}

.prize-item.second {
    border-color: #b7c0c9;
}

.prize-item.third {
    border-color: #d7a07a;
}

.prize-rank {
    font-weight: 700;
    color: var(--navy);
}

.prize-amount {
    margin: 6px 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold-deep);
}

.prize-gift {
    color: var(--muted);
    font-size: 0.95rem;
}

.participation-prize {
    text-align: center;
    background: var(--navy);
    color: #fff;
    border-radius: 16px;
    padding: 24px 20px;
}

.participation-prize h3 {
    color: var(--gold);
    margin-bottom: 6px;
}

/* 工作坊 */
.workshop {
    background:
        linear-gradient(160deg, rgba(232, 184, 109, 0.35), rgba(22, 50, 79, 0.08));
}

.workshop-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.86);
    border-radius: 14px;
    padding: 16px;
    font-weight: 500;
}

.detail-item i {
    color: var(--gold-deep);
}

.instructors h3 {
    text-align: center;
    color: var(--navy);
    margin-bottom: 18px;
}

.instructor-note {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--navy);
    color: var(--gold);
    font-size: 0.8rem;
    vertical-align: middle;
}

.instructor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.instructor {
    background: #fff;
    border-radius: 16px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 8px 20px var(--shadow);
}

.instructor-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.instructor-title {
    color: var(--muted);
    font-size: 0.95rem;
}

/* 報名 */
.register {
    background: var(--cream);
}

.register-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.register-info h3 {
    color: var(--navy);
    margin: 18px 0 8px;
    font-size: 1.15rem;
}

.register-info h3:first-child {
    margin-top: 0;
}

.register-info ul {
    margin-left: 1.1em;
}

.register-info li + li {
    margin-top: 8px;
}

.register-card {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    background: var(--navy);
    color: #fff;
    border-radius: 22px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 14px 32px rgba(14, 36, 56, 0.22);
}

.register-card i {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 12px;
}

.register-card h3 {
    margin-bottom: 8px;
}

.register-card p {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 18px;
}

/* 頁尾 */
.footer {
    background: var(--navy-deep);
    color: #fff;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.footer-info h3,
.footer-contact h3 {
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.footer-contact a {
    text-decoration: none;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.floating-apply {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1100;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy-deep);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(201, 149, 74, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-apply.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.floating-apply:hover,
.floating-apply:focus-visible {
    background: #f3cb8a;
    outline: none;
}

.scroll-top-btn {
    position: fixed;
    right: 22px;
    bottom: 78px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 16px var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 980px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 18px;
        background: #fff;
        box-shadow: 0 10px 18px var(--shadow);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu a {
        padding: 10px 12px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding-left: 28px;
    }

    .timeline-date {
        text-align: left;
        padding-top: 0;
    }

    .timeline-content::before {
        left: -24px;
        top: 20px;
    }

    .workshop-details,
    .instructor-grid,
    .prize-categories,
    .register-layout,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .register-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .section-title {
        font-size: 1.65rem;
    }

    section {
        padding: 56px 0;
    }

    .hero {
        padding-top: calc(var(--nav-height) + 16px);
    }

    .hero-banner {
        border-radius: 16px;
    }

    .about-panel {
        padding: 24px 18px;
    }

    .organizer-grid,
    .theme-grid,
    .rules-grid {
        grid-template-columns: 1fr;
    }

    .score-label {
        flex-direction: column;
        gap: 2px;
    }

    .voting-info {
        padding: 22px 18px;
    }

    .floating-apply {
        right: 14px;
        bottom: 14px;
    }

    .scroll-top-btn {
        right: 14px;
        bottom: 68px;
    }
}
