/* =========================================================
   西門盃 第一屆公開循環賽（/cup/）專用樣式
   共用 ../styles.css 的品牌色、按鈕、區塊、FAQ、頁尾
   ========================================================= */

.cup-page .header-nav a,
.cup-page .header-inner .btn { white-space: nowrap; }

/* ---------- 旋轉吧！西門 活動字標（頁首、主視覺） ---------- */
.cup-brand { display: flex; align-items: center; gap: 6px; flex: none; }
.cup-brand .header-logo,
.cup-brand-event { flex: none; }
.cup-brand .header-logo img { width: 64px; }
.cup-brand-x { font-weight: 900; font-size: 1rem; line-height: 1; }
.cup-brand-event { width: 76px; }
.cup-page .header-inner .btn-sm { padding-left: 14px; padding-right: 14px; }
.cup-event {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.cup-event-label {
  padding: 0 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 900;
  font-size: .9375rem;
  letter-spacing: .2em;
}
.cup-event-logo { width: min(76%, 420px); }
@media (min-width: 960px) {
  .cup-brand { gap: 8px; }
  .cup-brand .header-logo img { width: 92px; }
  .cup-brand-event { width: 104px; }
  .cup-page .header-inner { gap: 10px; }
  .cup-page .header-nav ul { gap: 0; }
  .cup-page .header-nav a { padding: 6px 7px; }
  .cup-event { flex-direction: row; align-items: center; gap: 14px; }
  .cup-event-logo { width: min(72%, 420px); }
}

@media (min-width: 1200px) {
  .cup-brand { gap: 12px; }
  .cup-brand .header-logo img { width: 120px; }
  .cup-brand-event { width: 140px; }
  .cup-page .header-nav ul { gap: 4px; }
  .cup-page .header-nav a { padding: 6px 12px; }
}

/* ---------- 主視覺 ---------- */
.cup-hero {
  position: relative;
  padding: 32px 0 56px;
  overflow: hidden;
}
.cup-hero::after {
  /* 底部手繪波浪（同首頁） */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14' viewBox='0 0 40 14'%3E%3Cpath d='M0 7 Q10 0 20 7 T40 7' fill='none' stroke='%2320201E' stroke-width='2.5'/%3E%3C/svg%3E") repeat-x center / 40px 14px;
}
.cup-hero-inner {
  display: grid;
  gap: 8px;
  align-items: center;
}
.cup-hero-text { text-align: center; }
.cup-title { margin: 0; }
.cup-title img { width: min(100%, 560px); margin: 0 auto; }
.cup-hero .cup-badge { margin-top: 10px; box-shadow: 3px 3px 0 var(--orange); }
.cup-sub {
  margin: 14px 0 18px;
  font-family: var(--font-fun);
  font-size: clamp(1.375rem, 5vw, 1.75rem);
  line-height: 1.4;
}
.cup-hero-art { position: relative; width: min(78%, 340px); margin: 0 auto; }
.cup-hero-art::before {
  /* 橘色圓形底 */
  content: "";
  position: absolute;
  inset: 10% 6% 4%;
  background: var(--orange);
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.cup-hero-art img { position: relative; }

/* ---------- 時間與地點 ---------- */
.cup-when { display: grid; gap: 20px; align-items: start; }
.cup-schedule { margin-bottom: 0; }
.cup-timeline span { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.cup-timeline small { margin: 0; }
.cup-note {
  margin: 14px 0 0;
  padding: 10px 14px;
  background: var(--paper);
  border: 2px dashed var(--ink);
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
}

/* ---------- 參賽資格・名額・報名費 ---------- */
.cup-entry { display: grid; gap: 22px; }
.cup-stat {
  padding: 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--orange);
  text-align: center;
}
.cup-stat h4 { margin: 0 0 4px; font-size: 1.25rem; }
.cup-entry-groups { display: grid; gap: 22px; }
.cup-entry-group { display: grid; gap: 12px; }
.cup-entry-label {
  justify-self: start;
  margin: 0;
  padding: 2px 16px;
  background: var(--orange);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-fun);
  font-size: 1.25rem;
}
.cup-entry-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cup-stat p { margin: 0; }
.cup-stat-num {
  font-weight: 900;
  font-size: clamp(3rem, 13vw, 3.75rem);
  line-height: 1.1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.cup-stat-num span { margin-left: .1em; font-size: .45em; }
.cup-stat-num .cup-stat-unit { margin: 0 .1em 0 0; }
.cup-stat-note { font-weight: 700; }
.cup-entry-card li + li { margin-top: .4em; }

/* ---------- 參賽規則 ---------- */
.cup-deco { display: block; }
.cup-deco img { width: min(70%, 280px); margin: 0 auto 6px; }
.cup-rules { display: grid; gap: 16px; align-items: center; }
.cup-rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  counter-reset: rule;
}
.cup-rule-list li {
  position: relative;
  padding: 12px 16px 12px 52px;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 700;
  counter-increment: rule;
}
.cup-rule-list li::before {
  content: counter(rule);
  position: absolute;
  left: 12px; top: 50%;
  width: 28px; height: 28px;
  margin-top: -14px;
  display: grid;
  place-items: center;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
  font-size: .9375rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  /* Noto Sans TC 的數字視覺偏下，往上推回圓心 */
  padding-bottom: 2px;
}
.cup-rules-art img { width: min(80%, 320px); margin: 0 auto; }

/* ---------- 報名方式與獎品 ---------- */
.cup-signup { display: grid; gap: 20px; }
.cup-card {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 20px;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.cup-card h3 { font-size: 1.625rem; margin-bottom: 6px; }
.cup-card p { color: var(--muted); }
.cup-card .btn-disabled { margin-top: 4px; }
.cup-card-cat { width: min(60%, 220px); margin: 0 auto; }
.cup-practice .cup-practice-art { width: min(88%, 320px); }

/* ---------- 每月賽事 ---------- */
.cup-monthly { display: grid; gap: 20px; }
.cup-monthly-main { text-align: left; }
.cup-monthly-main p { color: var(--ink); margin: 0; }
.cup-monthly-types {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cup-monthly-types li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--orange);
  text-align: center;
}
.cup-monthly-mark { display: block; width: min(100%, 260px); margin: -4px 0 2px; }
.cup-monthly-mark img { width: 100%; }
.cup-monthly-count { font-weight: 700; }
.cup-monthly-count strong {
  font-weight: 900;
  font-size: 2.25rem;
  line-height: 1.2;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.cup-month-plan {
  align-self: stretch;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--paper);
  border: 2px dashed var(--ink);
  border-radius: 14px;
}
.cup-month-plan h3 { margin: 0 0 6px; font-size: 1.125rem; }
.cup-month-plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cup-month-plan li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font-weight: 700; }
.cup-month-type { color: var(--orange-ink); font-weight: 900; }
.cup-monthly-main .cup-monthly-note { font-size: 1rem; color: var(--muted); }
.cup-practice { background: var(--paper-deep); border-style: dashed; }
.cup-practice p { margin: 0; }
.cup-practice-tag {
  display: inline-block;
  margin-bottom: 6px !important;
  padding: 0 10px;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: var(--ink) !important;
  font-weight: 900;
  font-size: .9375rem;
  letter-spacing: .15em;
}

/* ---------- 新賽制：兩天組別、每月賽事說明 ---------- */
.cup-days {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cup-days li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  text-align: center;
}
.cup-day-date { font-weight: 900; }
.cup-day-group { font-family: var(--font-fun); font-size: 1.25rem; color: var(--orange); }
.cup-day-group small { display: block; white-space: nowrap; font-family: var(--font-body); font-size: .9375rem; font-weight: 700; color: var(--paper); }
.cup-monthly-tip { margin-top: 2px; padding: 0 10px; background: var(--orange); color: var(--ink); border-radius: 999px; font-weight: 900; font-size: .875rem; }
.cup-monthly-detail { margin-top: 4px; font-size: .9375rem; line-height: 1.5; }
@media (max-width: 639px) {
  .cup-monthly-types { grid-template-columns: 1fr; }
  .cup-entry-stats { gap: 12px; }
  .cup-entry-stats .cup-stat { padding: 16px 8px; border-radius: 20px; }
  .cup-entry-stats .cup-stat-num { font-size: clamp(2.25rem, 10.5vw, 2.75rem); white-space: nowrap; }
  .cup-entry-stats .cup-stat-note { font-size: .9375rem; white-space: nowrap; }
}

/* ---------- 主辦與場地協力 ---------- */
.cup-org { padding: 32px 0; }
.cup-org-list {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 32px;
}
.cup-org-list div { display: flex; gap: 10px; align-items: baseline; }
.cup-org-list dt { color: var(--orange-ink); font-weight: 900; }
.cup-org-list dd { margin: 0; font-weight: 700; }

/* =========================================================
   平板以上
   ========================================================= */
@media (min-width: 640px) {
  /* 賽程每格都有補充說明，維持直式時間軸比較好讀 */
  .cup-timeline { grid-template-columns: 1fr; text-align: left; }
  .cup-timeline li { grid-template-columns: 4.2em 1fr; gap: 12px; padding: 8px 0 8px 22px; align-content: normal; }
  .cup-timeline li::before { left: 0; top: 50%; margin: -6px 0 0; }
  .cup-timeline li:not(:last-child)::after {
    left: 5px; top: calc(50% + 8px);
    width: 0; height: calc(100% - 16px);
    border-top: 0;
    border-left: 2px dashed var(--ink);
  }
  .cup-timeline small { display: inline-block; margin: 0; width: auto; }
  .cup-timeline time { font-size: 1.25rem; }
}

/* =========================================================
   桌機
   ========================================================= */
@media (min-width: 960px) {
  .cup-hero { padding: 48px 0 72px; }
  .cup-hero-inner { grid-template-columns: 1.15fr .85fr; gap: 40px; }
  .cup-hero-text { text-align: left; }
  .cup-title img { margin: 0; }
  .cup-hero-art { width: 100%; max-width: 440px; }

  .cup-when { grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
  .cup-when .info-list { grid-auto-rows: 1fr; }
  .cup-when .info-item { align-content: center; }
  .cup-schedule { display: flex; flex-direction: column; justify-content: center; }

  .cup-entry { grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: stretch; }
  .cup-entry-card { display: flex; flex-direction: column; justify-content: center; }
  .cup-stat { display: flex; flex-direction: column; justify-content: center; }

  .cup-rules { grid-template-columns: 1.2fr .8fr; gap: 40px; }
  .cup-rules-art img { width: min(100%, 420px); }

  .cup-signup { grid-template-columns: 1.2fr .8fr; }
  .cup-monthly { grid-template-columns: 1.25fr .75fr; align-items: stretch; }
  .cup-card.cup-monthly-main { display: flex; flex-direction: column; justify-content: center; padding: 28px 32px; }
  .cup-card.cup-practice { grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .cup-practice .cup-card-cat.cup-practice-art { width: min(92%, 300px); }
  .cup-card { grid-template-columns: 160px 1fr; gap: 20px; padding: 24px 28px; text-align: left; }
  .cup-card-cat { width: 100%; }
}
