:root {
  /* 第五屆海報配色（2026-10-27） */
  --ink: #163f45;
  --green: #2a8577;
  --green-dark: #1c6c6b;
  --mint: #b1dcd2;
  --mint-pale: #eaf5ef;
  --orchid: #2f6fa6;
  --paper: #f7fbf9;
  --line: #d3e4de;
  --soft: #56706f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; font-size: 18px; line-height: 1.85; }
a { color: var(--green-dark); }
svg { width: 16px; height: 16px; vertical-align: -3px; }

.g-nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px clamp(18px, 4vw, 48px); background: rgba(250, 252, 251, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.g-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #165f6b; text-decoration: none; }
.g-brand strong { display: block; font-family: "Noto Serif TC", serif; font-size: 20px; line-height: 1.25; }
.g-brand small { display: block; color: var(--soft); font-size: 16px; line-height: 1.25; }
.g-brand .brand-mark { flex: none; }
.brand-mark { position: relative; width: 36px; height: 36px; display: block; }
.brand-mark span { position: absolute; border-radius: 50%; }
.brand-mark span:nth-child(1) { inset: 0 8px 8px 0; background: var(--green); }
.brand-mark span:nth-child(2) { inset: 8px 0 0 8px; background: var(--mint); mix-blend-mode: multiply; }
.brand-mark span:nth-child(3) { width: 8px; height: 8px; right: 0; top: 0; background: var(--orchid); }
.g-nav-right { display: flex; align-items: center; gap: 18px; }
.g-link { color: var(--ink); text-decoration: none; font-size: 20px; }
.g-cta { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 999px; background: var(--green-dark); color: #fff; text-decoration: none; font-size: 19px; font-weight: 600; }
.g-cta.big { margin-top: 18px; padding: 13px 26px; font-size: 18px; }

.g-hero { padding: 64px 0 52px; color: #fff; background: linear-gradient(100deg, rgba(18, 72, 80, .95) 0%, rgba(22, 88, 92, .88) 50%, rgba(28, 108, 107, .55) 100%), url("assets/competition-poster.jpg") center 30% / cover; }
.g-inner { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.eyebrow { margin: 0 0 8px; color: var(--mint); font-size: 16px; font-weight: 700; letter-spacing: 0.14em; }
.g-hero h1 { margin: 0 0 12px; font-family: "Noto Serif TC", serif; font-size: clamp(34px, 5vw, 52px); line-height: 1.15; }
.g-hero p { margin: 0; max-width: 680px; color: rgba(255, 255, 255, 0.92); }
.g-hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.g-hero-tags span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; font-size: 17px; }

.g-layout { display: grid; grid-template-columns: 210px 1fr; gap: 48px; padding: 40px 0 64px; }
.g-toc { position: sticky; top: 90px; align-self: start; display: grid; gap: 2px; font-size: 18px; }
.g-toc strong { margin-bottom: 8px; font-size: 16px; color: var(--soft); letter-spacing: 0.1em; }
.g-toc a { padding: 6px 12px; border-left: 2px solid var(--line); color: var(--soft); text-decoration: none; }
.g-toc a.on, .g-toc a:hover { border-color: var(--green); color: var(--green-dark); font-weight: 600; }

.g-main { min-width: 0; }
.g-main section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.g-main section:last-child { border-bottom: 0; }
.g-main h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font-family: "Noto Serif TC", serif; font-size: 28px; }
.g-main h2 span { color: var(--mint); font-family: "Noto Sans TC", sans-serif; font-size: 18px; font-weight: 700; }
.g-main h3 { margin: 26px 0 10px; font-size: 21px; }
.g-main p { margin: 0 0 12px; }
.g-main ul, .g-main ol { margin: 0 0 12px; padding-left: 22px; }
.g-muted { color: var(--soft); font-size: 17px; }

.g-flow { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; counter-reset: f; }
.g-flow li { position: relative; display: grid; gap: 2px; padding: 14px 14px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); counter-increment: f; }
.g-flow li::before { content: counter(f, decimal-leading-zero); color: var(--soft); font-size: 15px; font-weight: 700; }
.g-flow li.org { border-top-color: var(--orchid); background: #f4f8fc; }
.g-flow b { font-size: 18px; }
.g-flow small { color: var(--green-dark); font-size: 16px; font-weight: 600; }
.g-flow li.org small { color: var(--orchid); }
.g-flow em { color: var(--soft); font-size: 16px; font-style: normal; }
.g-legend { display: flex; align-items: center; gap: 6px; color: var(--soft); font-size: 17px; }
.g-legend .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--green); display: inline-block; }
.g-legend .dot.org { background: var(--orchid); margin-left: 8px; }

.g-steps { counter-reset: s; list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.g-steps li { position: relative; padding: 2px 0 2px 40px; counter-increment: s; }
.g-steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--mint-pale); color: var(--green-dark); font-size: 17px; font-weight: 700; }

.g-table { width: 100%; margin: 6px 0 14px; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 18px; }
.g-table th, .g-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.g-table th { background: var(--mint-pale); font-size: 17px; }
.g-table tr:last-child td { border-bottom: 0; }
.g-table td:first-child { white-space: nowrap; font-weight: 600; }

.g-note, .g-tip, .g-warn { margin: 14px 0; padding: 14px 16px; border-radius: 8px; font-size: 18px; }
.g-note b:first-child, .g-tip b:first-child, .g-warn b:first-child { display: block; margin-bottom: 4px; }
.g-note { background: #fff; border: 1px solid var(--line); }
.g-tip { background: var(--mint-pale); border: 1px solid #c7dfd2; }
.g-warn { background: #fdf6e3; border: 1px solid #ecdcae; color: #5f4610; }
.g-warn a { color: inherit; font-weight: 700; }

.g-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g-cols > div { padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.g-cols ul { margin: 6px 0 0; }

.g-faq-group { color: var(--green-dark); }
details { margin-bottom: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
details[open] { border-color: #b9d3c6; }
summary { position: relative; padding: 12px 40px 12px 16px; font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 16px; top: 9px; color: var(--green-dark); font-size: 24px; font-weight: 400; }
details[open] summary::after { content: "−"; }
details > :not(summary) { margin: 0 16px 14px !important; font-size: 18px; }
details > ul, details > ol { padding-left: 36px !important; margin-left: 0 !important; }

.g-contact { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.g-contact p { margin: 0 0 4px; }
.g-mail { color: var(--green-dark); font-weight: 700; overflow-wrap: anywhere; }
.g-footer a { color: var(--green-dark); }
/* 參賽條款／私隱政策頁（2026-10-27） */
.g-doc { max-width: 880px; padding: 36px 0 64px; }
.g-doc section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.g-doc section:last-child { border-bottom: 0; }
.g-doc h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; font-family: "Noto Serif TC", serif; font-size: 24px; }
.g-doc h2 span { color: var(--green); font-family: "Noto Sans TC", sans-serif; font-size: 17px; font-weight: 700; }
.g-doc p { margin: 0 0 10px; }
.g-doc ol, .g-doc ul { margin: 0; padding-left: 24px; }
.g-doc li { margin-bottom: 6px; }
/* 主辦及協辦機構（標誌含白字，用深色底） */
.g-org { margin-top: 18px; padding: 20px 22px 24px; border-radius: 8px; color: #fff; background: #173f46; }
.g-main .g-org h3 { margin: 0 0 12px; color: var(--mint); font-size: 18px; letter-spacing: .12em; }
.g-main .g-org ul { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; margin: 0 0 18px; padding: 0; list-style: none; }
.g-main .g-org ul:last-child { margin-bottom: 0; }
.g-org img { display: block; height: 58px; width: auto; max-width: 100%; }
.g-footer { gap: 12px 24px; flex-wrap: wrap; }
.g-footer { display: flex; justify-content: space-between; padding: 22px clamp(18px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--soft); font-size: 17px; }

@media (max-width: 860px) {
  .g-layout { grid-template-columns: 1fr; gap: 20px; }
  .g-toc { position: static; grid-template-columns: repeat(2, 1fr); padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
  .g-toc strong { grid-column: 1 / -1; }
  .g-flow { grid-template-columns: repeat(2, 1fr); }
  .g-cols { grid-template-columns: 1fr; }
  .g-link { display: none; }
  .g-brand strong { font-size: 16px; }
  .g-brand small { font-size: 14px; }
  .g-org img { height: 46px; }
  .g-table td:first-child { white-space: normal; }
}
@media print {
  .g-nav, .g-toc, .g-cta, .g-footer { display: none !important; }
  .g-layout { grid-template-columns: 1fr; }
  details { break-inside: avoid; }
  details:not([open]) > :not(summary) { display: block; }
}

/* 触屏：放大可点区域（不影响桌面） */
@media (pointer: coarse) {
  .g-footer a { display: inline-flex; align-items: center; min-height: 40px; }
  summary { min-height: 44px; }
  .g-link { display: inline-flex; align-items: center; min-height: 44px; }
  .g-warn a { display: inline-block; padding: 6px 0; }
}
