:root {
      --bg: #1c1210;
      --text: #fbf3e6;
      --muted: #d9c4a8;
      --line: rgba(255, 255, 255, .18);
      --brand: #e08a3c;
      --brand-2: #c94a2f;
      --ok: #d8c47a;
      --danger: #ffb2b2;
      --shadow: 0 32px 90px rgba(0, 0, 0, .42);
      --radius: clamp(22px, 2.4vw, 38px);
      --side-card: clamp(250px, 24vw, 360px);
      --center-card: clamp(760px, 92vw, 1760px);
      --card-height: calc(100svh - 36px);
      --edge-pad: max(18px, calc((100vw - var(--center-card)) / 2));
    }

    * { box-sizing: border-box; }

    html,
    body {
      width: 100%;
      height: 100%;
      margin: 0;
    }

    html { scroll-behavior: smooth; }

    body {
      min-height: 100vh;
      min-height: 100svh;
      overflow: hidden;
      color: var(--text);
      font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
      background: #1e130f;
    }

    a { color: inherit; }

    button,
    input,
    select,
    textarea { font: inherit; }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* ===== 進場開門效果 ===== */
    .intro-gate {
      position: fixed;
      inset: 0;
      z-index: 999;
      overflow: hidden;
      background: #160c08;
      transition: opacity .7s ease, visibility .7s ease;
    }

    .intro-gate.is-done {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .gate-title {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 24px;
      pointer-events: none;
      text-align: center;
      opacity: 0;
      animation: gateTitleShow 5.6s ease forwards;
    }

    .gate-leaves {
      position: fixed;
      inset: 0;
      z-index: 1001;
      pointer-events: none;
      overflow: hidden;
    }

    .gleaf {
      position: absolute;
      left: 50%;
      top: 50%;
      opacity: 0;
      will-change: transform, opacity;
      animation: leafSwirl 3s cubic-bezier(.4, 0, .65, 1) forwards;
      animation-delay: calc(2.7s + var(--d, 0s));
    }

    .gleaf img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      opacity: .8;
      filter: saturate(.5) brightness(.98) sepia(.24)
              drop-shadow(0 5px 12px rgba(20, 10, 4, .34));
    }

    .gate-title span {
      display: inline-block;
      padding: 14px 22px;
      border: none;
      border-radius: 999px;
      background: transparent;
      backdrop-filter: none;
      box-shadow: none;
      color: rgba(255, 245, 232, .62);
      font-family: "Cormorant Garamond", Georgia, serif;
      font-style: italic;
      font-weight: 500;
      font-size: clamp(1.05rem, 2.4vw, 1.7rem);
      letter-spacing: .02em;
    }

    .gate-title {
      gap: 12px;
    }

    .gate-logos {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: end;
      column-gap: clamp(18px, 4vw, 44px);
      width: 100%;
    }

    .gate-logos .gate-logo-funday { justify-self: end; }
    .gate-logos .gate-logo-tts { justify-self: start; }

    .gate-logo {
      display: block;
      height: auto;
      filter: drop-shadow(0 8px 30px rgba(0,0,0,.4));
    }

    .gate-logo-funday { width: auto; height: clamp(20px, 2.1vw, 30px); }
    .gate-logo-taebdc { width: min(280px, 30vw); }
    .gate-logo-tts { width: auto; height: clamp(26px, 2.7vw, 38px); }

    @media (max-width: 640px) {
      .gate-title {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
          "taebdc taebdc"
          "tag tag"
          "funday tts";
        align-content: center;
        justify-items: center;
        column-gap: 14px;
        row-gap: 6px;
      }

      .gate-logos { display: contents; }
      .gate-title > span { grid-area: tag; }
      .gate-logo-taebdc { grid-area: taebdc; width: min(270px, 66vw); }
      .gate-logo-funday { grid-area: funday; justify-self: end; width: min(140px, 38vw); height: auto; }
      .gate-logo-tts { grid-area: tts; justify-self: start; width: min(140px, 38vw); height: auto; }
    }

    /* 參加活動／有關 FUNDAY 卡：讓右上角 logo 以 body 為基準 */
    #join .card-body,
    #products .card-body,
    #awards .card-body {
      position: relative;
    }

    /* 手機版：活動說明卡視覺區左上角 logo */
    #details .card-visual .visual-logo {
      position: absolute;
      top: 15px;
      left: 18px;
      z-index: 3;
      height: 24px;
      width: auto;
      max-width: 46%;
      object-fit: contain;
      object-position: left center;
      display: none;
      filter: drop-shadow(0 3px 12px rgba(0,0,0,.45));
    }
    .tag-logo {
      height: clamp(30px, 2.4vw, 40px);
      width: auto;
      margin-right: 4px;
      flex: 0 0 auto;
      filter: drop-shadow(0 3px 12px rgba(0,0,0,.4));
    }
    .tag-row { align-items: center; }
    .tag-logo-funday { margin-right: 0; height: clamp(24px, 1.92vw, 32px); }
    .tag-logo-tts { margin-right: 0; height: clamp(24px, 1.92vw, 32px); }
    .tag-logo-taebdc { margin-right: 0; }
    .tag-row { gap: clamp(14px, 1.8vw, 26px); }

    .corner-logos {
      position: absolute;
      top: clamp(16px, 2vw, 28px);
      right: clamp(20px, 2.4vw, 40px);
      z-index: 6;
      display: flex;
      align-items: center;
      gap: clamp(14px, 1.6vw, 24px);
    }

    /* 品牌標：參加活動／有關 FUNDAY 卡放在右上角 */
    .corner-logo {
      z-index: 6;
      height: clamp(30px, 2.4vw, 40px);
      width: auto;
      filter: drop-shadow(0 3px 12px rgba(0,0,0,.4));
    }
    .corner-logo-funday { height: clamp(24px, 1.92vw, 32px); }
    .corner-logo-tts { height: clamp(24px, 1.92vw, 32px); }

    .skip-intro {
      position: fixed;
      right: 20px;
      bottom: 20px;
      z-index: 1001;
      padding: 10px 14px;
      border: 1px solid rgba(255,255,255,.2);
      border-radius: 999px;
      color: var(--text);
      background: rgba(255,255,255,.08);
      backdrop-filter: blur(10px);
      cursor: pointer;
    }

    @keyframes gateTitleShow {
      0%   { opacity: 0; transform: translateY(64px) scale(.98); }
      18%  { opacity: 1; transform: translateY(0) scale(1); }
      66%  { opacity: 1; transform: translateY(0) scale(1); }
      82%  { opacity: 0; transform: translateY(-8px) scale(1.02); }
      100% { opacity: 0; }
    }

    @keyframes leafSwirl {
      0%   { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateX(0) rotate(0deg) scale(.3); }
      10%  { opacity: 1; transform: translate(-50%, -50%) rotate(calc(var(--a) + 34deg)) translateX(4vmin) rotate(34deg) scale(.7); }
      42%  { opacity: 1; transform: translate(-50%, -50%) rotate(calc(var(--a) + 200deg)) translateX(9vmin) rotate(150deg) scale(1); }
      100% { opacity: 0; transform: translate(-50%, -50%) rotate(calc(var(--a) + var(--turn))) translateX(var(--dist)) rotate(var(--spin)) scale(1.05); }
    }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .intro-gate { display: none; }
      *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
      }
    }

    /* ===== 全版卡牌 ===== */
    main,
    .cards-stage,
    .carousel-wrap {
      width: 100vw;
      height: 100vh;
      height: 100svh;
    }

    .cards-stage {
      position: relative;
      overflow: hidden;
    }

    .cards-stage::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(90deg, rgba(26,14,9,.34), transparent 14%, transparent 86%, rgba(26,14,9,.34)),
        radial-gradient(circle at 50% 92%, rgba(224,138,60,.12), transparent 34%);
      z-index: 1;
    }

    .carousel-wrap {
      position: relative;
      overflow: hidden;
    }

    .cards-carousel {
      position: relative;
      z-index: 2;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      gap: clamp(18px, 2.1vw, 34px);
      overflow-x: hidden;
      overflow-y: hidden;
      scroll-behavior: smooth;
      scroll-padding-inline: var(--edge-pad);
      padding: 18px var(--edge-pad);
      scrollbar-width: none;
      cursor: grab;
      touch-action: pan-y;
    }

    .cards-carousel.dragging {
      scroll-behavior: auto;
      cursor: grabbing;
      user-select: none;
    }

    .cards-carousel::-webkit-scrollbar { display: none; }

    .event-card {
      position: relative;
      flex: 0 0 var(--side-card);
      height: min(680px, calc(100svh - 92px));
      display: grid;
      grid-template-rows: 190px 1fr;
      overflow: hidden;
      scroll-snap-align: center;
      scroll-snap-stop: always;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: var(--radius);
      opacity: .38;
      transform: scale(.84);
      background:
        linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.065)),
        rgba(255,255,255,.07);
      box-shadow: 0 18px 50px rgba(0,0,0,.24);
      transition:
        flex-basis .32s ease,
        height .32s ease,
        opacity .32s ease,
        transform .32s ease,
        border-color .32s ease,
        background .32s ease,
        box-shadow .32s ease;
    }

    .event-card.is-selected {
      z-index: 3;
      flex-basis: var(--center-card);
      height: var(--card-height);
      grid-template-columns: minmax(230px, 28%) minmax(0, 1fr);
      grid-template-rows: 1fr;
      opacity: 1;
      transform: scale(1);
      border-color: rgba(224, 138, 60, .72);
      background:
        linear-gradient(180deg, rgba(224,138,60,.18), rgba(255,255,255,.07)),
        rgba(255,255,255,.08);
      box-shadow: var(--shadow);
    }

    .event-card:not(.is-selected) { cursor: pointer; }

    .event-card:not(.is-selected):hover {
      opacity: .62;
      transform: scale(.88) translateY(-3px);
      border-color: rgba(255,255,255,.28);
    }

    .card-visual {
      min-height: 0;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      padding: 22px;
      background:
        radial-gradient(circle at 20% 18%, rgba(255,255,255,.32), transparent 22%),
        linear-gradient(135deg, rgba(224,138,60,.88), rgba(201,74,47,.74));
      transition: padding .32s ease;
    }

    .event-card.is-selected .card-visual {
      height: auto;
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-end;
      padding: clamp(28px, 4vw, 54px);
    }

    /* 三張卡片：統一底色，圖片右緣羽化到同色，消除接縫 */
    #details.event-card.is-selected,
    #join.event-card.is-selected,
    #products.event-card.is-selected,
    #awards.event-card.is-selected {
      background: #2a1a13;
    }

    #details .card-visual,
    #join .card-visual,
    #products .card-visual,
    #awards .card-visual {
      position: relative;
      overflow: hidden;
      background: #20130e;
    }

    /* 點點層：緩慢飄移 */
    #details .card-visual::before,
    #join .card-visual::before,
    #products .card-visual::before,
    #awards .card-visual::before {
      content: "";
      position: absolute;
      inset: 0;
      background: url("../img/funday_taebdc100126/panel_funday_taebdc100126.png") center / cover no-repeat;
      z-index: 0;
    }

    /* 漸層遮罩層：蓋在點點上、文字下 */
    #details .card-visual::after,
    #join .card-visual::after,
    #products .card-visual::after,
    #awards .card-visual::after {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(90deg, transparent 50%, rgba(42,26,19,.7) 80%, #2a1a13 100%),
        linear-gradient(180deg, rgba(26,14,9,.12), rgba(26,14,9,.5));
      z-index: 1;
    }

    #details .card-visual > *,
    #join .card-visual > *,
    #products .card-visual > *,
    #awards .card-visual > * {
      position: relative;
      z-index: 2;
    }

    #details .card-body,
    #join .card-body,
    #products .card-body,
    #awards .card-body {
      background: #2a1a13;
    }

    #details .card-visual strong,
    #join .card-visual strong,
    #products .card-visual strong,
    #awards .card-visual strong {
      color: #fff;
      text-shadow: 0 2px 20px rgba(0,0,0,.4);
    }

    .card-visual strong {
      color: #07101f;
      font-family: "Noto Sans TC", ui-sans-serif, system-ui, sans-serif;
      font-weight: 900;
      font-size: clamp(1.4rem, 2.2vw, 2.1rem);
      line-height: 1.05;
      letter-spacing: .02em;
    }

    .event-card.is-selected .card-visual strong {
      font-size: clamp(2.6rem, 5vw, 4.6rem);
      line-height: 1.02;
      letter-spacing: .04em;
    }

    .card-body {
      min-height: 0;
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 22px;
      overflow: auto;
      scrollbar-width: thin;
      scrollbar-color: rgba(255,255,255,.28) transparent;
      scrollbar-gutter: stable;
    }

    .card-body::-webkit-scrollbar {
      width: 8px;
    }

    /* 得獎公告表格 */
    .award-h3 {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      user-select: none;
    }

    .award-caret {
      display: inline-block;
      font-size: .55em;
      color: var(--brand);
      transition: transform .2s ease;
    }

    .award-h3[aria-expanded="false"] .award-caret { transform: rotate(-90deg); }

    .award-h3[aria-expanded="false"] + .award-table-wrap {
      display: none;
    }

    .award-table-wrap {
      position: relative;
      width: 100%;
      flex: 0 0 auto;
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 244, 230, .04);
    }

    .award-table {
      width: 100%;
      border-collapse: collapse;
      font-size: .92rem;
      color: var(--text);
    }

    .award-table th,
    .award-table td {
      padding: 10px 14px;
      text-align: left;
      border-bottom: 1px solid var(--line);
      white-space: nowrap;
    }

    .award-table thead th { text-align: center; }

    .award-table thead th {
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      color: #23140c;
      font-weight: 800;
      letter-spacing: .03em;
    }

    .award-table thead th:first-child { border-top-left-radius: 11px; }
    .award-table thead th:last-child { border-top-right-radius: 11px; }

    .award-table tbody tr:last-child td { border-bottom: none; }

    .award-table tbody td { height: 52px; color: var(--muted); }

    /* 手機版兩行式精簡卡片（桌機／平板隱藏，改由表格呈現） */
    .award-cards { display: none; }

    .award-cards .wc-row {
      padding: 12px 4px;
      border-bottom: 1px solid var(--line);
    }
    .award-cards .wc-row:last-child { border-bottom: none; }
    .award-cards .wc-top {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 0;
    }
    .award-cards .wc-school {
      font-weight: 700;
      font-size: .98rem;
      min-width: 0;
      flex: 1 1 auto;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--text);
    }
    .award-cards .wc-name {
      font-weight: 700;
      color: var(--brand);
      white-space: nowrap;
      flex: 0 0 auto;
      margin-left: 2em;
    }
    .award-cards .wc-sub {
      margin-top: 5px;
      color: var(--muted);
      font-size: .82rem;
      line-height: 1.5;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .award-cards .wc-dot { opacity: .5; margin: 0 6px; }
    .award-cards .winners-empty {
      padding: 18px 14px;
      color: var(--muted);
      opacity: .8;
      text-align: center;
    }

    .card-body::-webkit-scrollbar-track {
      background: transparent;
    }

    .card-body::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,.22);
      border-radius: 999px;
      border: 2px solid transparent;
      background-clip: padding-box;
    }

    .card-body::-webkit-scrollbar-thumb:hover {
      background: rgba(255,255,255,.42);
      background-clip: padding-box;
    }

    .event-card.is-selected .card-body {
      gap: clamp(16px, 1.8vw, 24px);
      padding: clamp(8px, 1.2vw, 16px) clamp(24px, 4vw, 54px) clamp(16px, 2vw, 26px);
      margin: clamp(8px, 1vw, 16px) 10px clamp(20px, 2.4vw, 38px) 0;
      border-radius: 0 12px 12px 0;
    }

    /* 活動說明卡右上角 CTA */
    .card-cta-top {
      position: absolute;
      top: clamp(14px, 1.8vw, 26px);
      right: clamp(34px, 4vw, 60px);
      z-index: 6;
    }

    /* 教學影片：標題列 + 收合按鈕 + 播放器 */
    .tutorial-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .tutorial-head .required-note { margin: 0; }

    .video-toggle {
      flex: 0 0 auto;
      min-height: 34px;
      padding: 7px 15px;
      border: 1px solid rgba(255, 255, 255, .2);
      border-radius: 999px;
      color: #23140c;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      font-weight: 800;
      font-size: .84rem;
      cursor: pointer;
      transition: filter .18s ease;
    }

    .video-toggle:hover { filter: brightness(1.06); }

    .tutorial-head .required-note { margin-right: auto; }
    .res-url-btn {
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      background: transparent;
      color: var(--brand);
      border-color: rgba(255, 255, 255, .24);
    }
    .res-url-btn:hover { filter: none; background: rgba(255, 255, 255, .06); }
    .res-url-btn[aria-disabled="true"] {
      opacity: .45;
      pointer-events: none;
    }

    @media (max-width: 980px) {
      .tutorial-head {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
          "note res"
          "note vid"
          "note gui";
        align-items: center;
        row-gap: 8px;
        column-gap: 12px;
      }
      .tutorial-head .required-note { grid-area: note; margin: 0; }
      .tutorial-head #resourceLink { grid-area: res; justify-self: end; }
      .tutorial-head #videoToggle { grid-area: vid; justify-self: end; }
      .tutorial-head #guideToggle { grid-area: gui; justify-self: end; }
      .account-box { text-align: center; }
      .account-box .account-text { text-align: left; }
      .account-box #copyAcct { display: block; margin-left: auto; margin-right: auto; }
    }

    /* 必填說明（縮小字體） */
    .required-note {
      color: var(--muted);
      font-size: .82rem !important;
      margin: 0;
    }

    /* 姓名＋學號並排 */
    .name-pair {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    /* 系級／姓名／學號 三欄並排（本人與好友） */
    .info-trio,
    .friend-trio {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .info-trio { grid-column: 1 / -1; }

    /* ===== 新手指引：聚光燈導覽 ===== */
    .guide-btn {
      color: var(--text);
      background: transparent;
      border-color: rgba(255,255,255,.34);
      font-weight: 700;
    }

    .guide-btn:hover { filter: none; background: rgba(255,255,255,.1); }

    .guide-layer[hidden] { display: none; }

    .guide-layer {
      position: fixed;
      inset: 0;
      z-index: 70;
    }

    .guide-mask {
      position: fixed;
      border-radius: 14px;
      box-shadow: 0 0 0 9999px rgba(18, 9, 5, .74);
      outline: 2px solid var(--brand);
      outline-offset: 3px;
      pointer-events: none;
      transition: top .26s ease, left .26s ease, width .26s ease, height .26s ease;
    }

    /* 歡迎步驟：0×0 矩形只負責全屏變暗，不顯示亮框 */
    .guide-mask.is-plain { outline: 0; }

    .guide-tip {
      position: fixed;
      width: min(380px, calc(100vw - 24px));
      display: grid;
      gap: 10px;
      padding: 18px 18px 14px;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 18px;
      background: #261811;
      box-shadow: 0 28px 70px rgba(0,0,0,.55);
    }

    .guide-step {
      margin: 0;
      color: var(--brand);
      font-size: .74rem;
      font-weight: 800;
      letter-spacing: .1em;
    }

    .guide-title {
      margin: 0;
      font-size: 1.06rem;
      font-weight: 800;
      letter-spacing: -.01em;
      color: var(--text);
      text-wrap: normal;
      word-break: normal;
      line-break: strict;
    }

    .guide-text {
      margin: 0;
      color: var(--muted);
      font-size: .88rem;
      line-height: 1.75;
      text-wrap: normal;
      word-break: normal;
      overflow-wrap: break-word;
      line-break: strict;
    }

    .guide-text .guide-link {
      color: var(--brand);
      font-weight: 700;
      text-decoration: underline;
      text-underline-offset: 2px;
      cursor: pointer;
    }

    .guide-nav {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
    }

    .guide-skip {
      margin-right: auto;
      padding: 6px 2px;
      border: 0;
      background: none;
      color: var(--muted);
      font-size: .8rem;
      text-decoration: underline;
      text-underline-offset: 3px;
      cursor: pointer;
    }

    .guide-skip:hover { color: var(--text); }

    /* 最後一步沒有「略過」，剩下兩顆按鈕水平置中 */
    .guide-nav:has(.guide-skip[hidden]) { justify-content: center; }

    .guide-nav .video-toggle { min-height: 36px; }

    .guide-ghost {
      color: var(--text);
      background: transparent;
      border-color: rgba(255,255,255,.3);
      font-weight: 700;
    }

    .guide-ghost:hover { filter: none; background: rgba(255,255,255,.1); }

    /* 個資同意浮動視窗 */
    .consent-box[hidden] { display: none; }

    .consent-box {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 0;
      padding: 24px;
      background: rgba(26, 14, 9, .62);
      backdrop-filter: blur(6px);
    }

    .consent-inner {
      width: min(560px, 92vw);
      max-height: 82vh;
      overflow: auto;
      display: grid;
      gap: 14px;
      padding: 26px 26px 22px;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 20px;
      background: #261811;
      box-shadow: 0 32px 90px rgba(0,0,0,.5);
    }

    .consent-inner h4 {
      margin: 0;
      font-size: 1.15rem;
      letter-spacing: -.02em;
    }

    .consent-box p {
      margin: 0;
      color: var(--muted);
      font-size: .9rem !important;
      line-height: 1.75;
    }

    .consent-list {
      margin: 0;
      padding-left: 1.3em;
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: .88rem;
      line-height: 1.7;
      list-style: disc;
    }

    .consent-list ul {
      margin: 6px 0 0;
      padding-left: 1.3em;
      display: grid;
      gap: 4px;
      list-style: circle;
    }

    /* 個人閱讀週提醒浮動視窗 */
    .promo-modal[hidden] { display: none; }

    .promo-modal {
      position: fixed;
      inset: 0;
      z-index: 60;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 24px;
      background: rgba(26, 14, 9, .62);
      backdrop-filter: blur(6px);
    }

    .promo-inner {
      position: relative;
      width: min(500px, 92vw);
      display: grid;
      gap: 14px;
      padding: 30px 28px 26px;
      border: 1px solid rgba(224,138,60,.35);
      border-radius: 22px;
      background: linear-gradient(160deg, #1d2740, #261811 65%);
      box-shadow: 0 32px 90px rgba(0,0,0,.55);
      text-align: center;
    }

    .promo-badge {
      justify-self: center;
      padding: 6px 16px;
      border-radius: 999px;
      font-size: .82rem;
      font-weight: 700;
      letter-spacing: .04em;
      color: #07101f;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
    }

    .promo-inner h3 {
      margin: 0;
      font-size: clamp(1.4rem, 2.4vw, 1.85rem);
      letter-spacing: -.02em;
    }

    .promo-inner .promo-main {
      margin: 0;
      color: var(--text);
      font-size: 1rem;
      line-height: 1.75;
    }

    .promo-inner .promo-note {
      margin: 0;
      color: var(--muted);
      font-size: .9rem;
      line-height: 1.6;
    }

    .promo-x { color: #ff6b6b; font-weight: 700; }

    .promo-inner .pill-btn { justify-self: center; margin-top: 4px; min-width: 140px; }

    .consent-box .pill-btn { justify-self: center; margin-top: 4px; }

    .friend-hint {
      grid-column: 1 / -1;
      margin: 0;
      color: var(--muted);
      font-size: .84rem !important;
      line-height: 1.7;
    }

    .hl-red { color: #ff6b6b; font-weight: 700; }

    /* 貴校專屬帳號／密碼提示列（選擇學校後顯示） */
    .account-box {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin: 2px 0;
      padding: 12px 16px;
      border: 1px solid rgba(255, 255, 255, .14);
      border-radius: 16px;
      background: rgba(0, 0, 0, .3);
      color: var(--text);
    }

    .account-box[hidden] { display: none; }

    .account-text {
      flex: 1 1 240px;
      font-size: .92rem;
      line-height: 1.7;
      color: var(--muted);
    }

    .account-link {
      color: var(--brand);
      font-weight: 800;
      text-decoration: none;
    }

    .account-link:hover { text-decoration: underline; }

    .account-cred {
      font-weight: 800;
      letter-spacing: .02em;
      color: var(--text);
    }

    .account-copy {
      flex: 0 0 auto;
      min-height: 36px;
      padding: 8px 15px;
      border: 1px solid rgba(255, 255, 255, .2);
      border-radius: 999px;
      color: #23140c;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      font-weight: 800;
      font-size: .88rem;
      cursor: pointer;
      transition: filter .18s ease, background .3s ease;
    }

    .account-copy:hover { filter: brightness(1.06); }

    .account-copy.is-copied {
      color: #12240f;
      background: linear-gradient(135deg, var(--ok), var(--brand));
    }

    /* 「開卷就抽獎」小標：箔金色金屬質感 */
    .promo-head {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }

    .promo-tag {
      display: inline-block;
      margin: 0;
      padding: 5px 16px;
      border-radius: 11px;
      border: 1px solid rgba(120,80,20,.5);
      background: linear-gradient(135deg, #b8860b 0%, #f6e08a 26%, #d4a437 50%, #fff4c2 68%, #c9992e 100%);
      color: #4a3208;
      font-weight: 800;
      font-size: .9rem;
      letter-spacing: .1em;
      box-shadow: inset 0 1px 0 rgba(255,250,220,.8), 0 4px 14px rgba(26,14,9,.3);
    }

    /* 著作權宣告：卡片內容底部 */
    .card-copyright {
      margin: 22px 0 0;
      padding-top: 16px;
      border-top: 1px solid rgba(255,255,255,.1);
      color: var(--muted);
      font-size: .78rem !important;
      line-height: 1.6;
      opacity: .8;
    }

    /* 主辦單位：與版權宣告成一組，共用上方分隔線 */
    .card-organizer {
      margin: 22px 0 0;
      padding-top: 16px;
      border-top: 1px solid rgba(255,255,255,.1);
      color: var(--muted);
      font-size: .78rem !important;
      line-height: 1.6;
      opacity: .85;
    }

    .copy-mail {
      position: relative;
      appearance: none;
      border: 0;
      padding: 0;
      background: none;
      font: inherit;
      color: inherit;
      text-decoration: underline;
      text-underline-offset: 2px;
      cursor: pointer;
    }

    .copy-mail:hover,
    .copy-mail:focus-visible {
      color: var(--brand);
    }

    .copy-mail.copied::after {
      content: "已複製";
      position: absolute;
      left: 50%;
      bottom: calc(100% + 8px);
      transform: translateX(-50%);
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--brand);
      color: #2a1408;
      font-size: .72rem;
      letter-spacing: .04em;
      white-space: nowrap;
      pointer-events: none;
    }

    .card-organizer + .card-copyright {
      margin-top: 2px;
      padding-top: 0;
      border-top: none;
    }

    .card-body h2,
    .card-body h3 {
      margin: 0;
      font-size: clamp(1.24rem, 2.4vw, 2.15rem);
      letter-spacing: -.04em;
    }

    .event-card.is-selected .card-body h2,
    .event-card.is-selected .card-body h3 {
      font-size: clamp(1.8rem, 3.2vw, 3.2rem);
      line-height: 1.02;
    }

    .card-body p,
    .card-body li {
      color: var(--muted);
      line-height: 1.75;
    }

    .event-card.is-selected .card-body p,
    .event-card.is-selected .card-body li {
      font-size: clamp(1rem, 1.22vw, 1.15rem);
    }

    .card-body p { margin: 0; }

    .card-body ul {
      margin: 0;
      padding-left: 1.15em;
    }

    .tag-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .tag {
      min-height: 30px;
      display: inline-flex;
      align-items: center;
      padding: 6px 10px;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 999px;
      color: var(--muted);
      background: rgba(255,255,255,.06);
      font-size: .88rem;
    }

    .event-card.is-selected .tag {
      min-height: 34px;
      padding: 7px 12px;
      font-size: .95rem;
    }

    .card-footer {
      margin-top: auto;
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .pill-btn {
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 15px;
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 999px;
      color: var(--text);
      background: rgba(255,255,255,.08);
      text-decoration: none;
      cursor: pointer;
    }

    .pill-btn:hover { background: rgba(255,255,255,.15); }

    .pill-btn.primary {
      border-color: rgba(255,255,255,.2);
      color: #07101f;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      font-weight: 900;
    }

    /* ===== 控制元件：浮在卡牌上，不佔版面高度 ===== */
    .dots {
      position: absolute;
      z-index: 8;
      left: 50%;
      bottom: clamp(18px, 2.4vh, 28px);
      display: flex;
      justify-content: center;
      gap: 8px;
      padding: 9px 11px;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 999px;
      background: rgba(26, 14, 9, .42);
      backdrop-filter: blur(14px);
      transform: translateX(-50%);
      transition: opacity .45s ease;
    }

    /* 手機版閒置時淡出，觸碰／滑動再浮現 */
    .dots.is-idle {
      opacity: .16;
    }

    .dot {
      width: 10px;
      height: 10px;
      padding: 0;
      border: 0;
      border-radius: 999px;
      background: rgba(255,255,255,.32);
      cursor: pointer;
      transition: width .2s ease, background .2s ease;
    }

    .dot.is-active {
      width: 30px;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
    }

    /* ===== Form ===== */
    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .form-grid .full { grid-column: 1 / -1; }

    label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: .92rem;
    }

    input,
    select,
    textarea {
      width: 100%;
      padding: 12px 13px;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 16px;
      color: var(--text);
      background: rgba(0,0,0,.18);
      outline: none;
    }

    /* 學校名稱下拉：選單文字黑色、自訂箭頭靠左一些 */
    #schoolSelect {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      padding-right: 46px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23cbd3e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 18px center;
    }

    #schoolSelect option {
      color: #111;
      background: #fff;
    }

    /* 填寫前後保持相同底色與文字色（抵銷瀏覽器自動填入樣式） */
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    textarea:-webkit-autofill,
    select:-webkit-autofill {
      -webkit-text-fill-color: var(--text);
      caret-color: var(--text);
      transition: background-color 9999s ease-out 0s;
      box-shadow: 0 0 0 1000px #2b1c14 inset;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: rgba(224,138,60,.8);
      box-shadow: 0 0 0 4px rgba(224,138,60,.13);
    }

    textarea {
      min-height: 92px;
      resize: vertical;
    }

    .form-status {
      display: none;
      margin: 0;
      white-space: pre-line;
      padding: 12px 14px;
      border: 1px solid rgba(196,176,92,.24);
      border-radius: 16px;
      color: var(--ok);
      background: rgba(196,176,92,.08);
      line-height: 1.55;
    }

    .form-status.is-error {
      border-color: rgba(255,178,178,.24);
      color: var(--danger);
      background: rgba(255,178,178,.08);
    }

    .form-status.is-show { display: block; }

    /* 行動版：訊息吸附於卡片捲動區底部，捲到任何欄位都看得到 */
    @media (max-width: 980px) {
      #join .card-body > .form-status.is-show {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin-top: auto;
        background: #33211a;
        box-shadow: 0 10px 26px rgba(20,10,6,.45);
      }
    }

    /* 最上層浮動提示（提交成功） */
    .funday-toast {
      position: fixed;
      top: 22px;
      left: 50%;
      transform: translate(-50%, -12px);
      z-index: 4000;
      padding: 12px 26px;
      border-radius: 999px;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      color: #23140c;
      font-weight: 800;
      font-size: 1rem;
      letter-spacing: .04em;
      box-shadow: 0 10px 30px rgba(26,14,9,.45);
      opacity: 0;
      pointer-events: none;
      transition: opacity .22s ease, transform .22s ease;
    }

    .funday-toast.is-show {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    /* 行動版：置於當下螢幕正中央 */
    @media (max-width: 720px) {
      .funday-toast {
        top: 50%;
        transform: translate(-50%, calc(-50% - 10px));
        max-width: calc(100vw - 48px);
        text-align: center;
      }

      .funday-toast.is-show {
        transform: translate(-50%, -50%);
      }
    }

    /* 未填必填／姓名重複的欄位以紅色粗框框起來 */
    .field-invalid,
    .field-invalid:focus {
      border-color: #ff6b6b !important;
      border-width: 2px !important;
      box-shadow: 0 0 0 2px rgba(255,107,107,.32) !important;
    }

    .friend-box {
      grid-column: 1 / -1;
      display: grid;
      gap: 10px;
      margin: 0;
      padding: 14px;
      border: 1px dashed rgba(255,255,255,.2);
      border-radius: 16px;
    }

    .friend-box legend {
      padding: 0 6px;
      color: var(--muted);
      font-size: .9rem;
    }

    .agree-row {
      grid-column: 1 / -1;
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      gap: 10px;
      color: var(--muted);
      line-height: 1.5;
    }

    .agree-row input {
      width: auto;
      margin-top: 3px;
    }

    .agree-row a { color: var(--brand); }

    iframe[name="hidden_iframe"] { display: none; }

    @media (min-width: 1500px) {
      :root {
        --center-card: min(2360px, 92vw);
        --side-card: clamp(320px, 13vw, 460px);
      }
    }

    @media (max-width: 980px) {
      :root {
        --center-card: 86vw;
        --side-card: 70vw;
        --card-height: calc(100svh - 40px);
        --edge-pad: max(18px, calc((100vw - var(--center-card)) / 2));
      }

      /* 平板／手機：只在「活動說明」卡顯示 logo */
      .corner-logo, .corner-logos { display: none; }

      /* 平板／手機：隱藏活動說明、有關 FUNDAY 卡的 tag */
      #details .tag-row,
      #products .tag-row,
      #awards .tag-row { display: none; }

      /* 得獎公告：手機／平板改用兩行式精簡卡片，隱藏完整表格 */
      #awards .award-table { display: none; }
      #awards .award-cards { display: block; }

      /* 手機／平板：活動說明 logo 移到視覺區左上角，隱藏 tag 旁的 logo */
      #details .card-visual .visual-logo { display: block; }
      #details .tag-logo { display: none; }

      .cards-carousel {
        padding-block: 12px 24px;
        align-items: flex-start;
      }

      .event-card,
      .event-card.is-selected {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(170px, 32svh) 1fr;
      }

      .event-card.is-selected .card-visual {
        padding: 24px;
      }

      .event-card.is-selected .card-visual strong {
        font-size: clamp(2.5rem, 13vw, 4.5rem);
      }

      .event-card.is-selected .card-body {
        padding: 22px;
      }

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

      /* 平板／手機：本人與好友的三欄改為單欄堆疊 */
      .name-pair,
      .info-trio,
      .friend-trio { grid-template-columns: 1fr; }

      /* 指示器改成底部細進度線（分段顯示目前卡片） */
      .dots {
        left: 50%;
        bottom: 10px;
        transform: translateX(-50%);
        width: min(86vw, 480px);
        gap: 6px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
      }

      .dot,
      .dot.is-active {
        flex: 1;
        width: auto;
        height: 4px;
        border-radius: 999px;
      }

      .dot { background: rgba(255,255,255,.24); }

      .dot.is-active {
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
      }
    }

    @media (max-width: 560px) {
      :root {
        --center-card: 88vw;
        --side-card: 78vw;
        --card-height: calc(100svh - 40px);
      }

      .cards-carousel { gap: 14px; }

      .event-card {
        opacity: .32;
        transform: scale(.88);
      }

      .event-card.is-selected { transform: scale(1); }
      .event-card:not(.is-selected):hover { transform: scale(.88); }

      /* 內容型卡片（參加活動／有關 FUNDAY）改成「精簡標題列 + 大內文」， */
      /* 「活動說明」卡保留原本大字主視覺。 */
      .event-card.is-selected#join,
      .event-card.is-selected#products,
      .event-card.is-selected#awards {
        grid-template-rows: auto 1fr;
      }

      .card-visual,
      #join.is-selected .card-visual,
      #products.is-selected .card-visual,
      #awards.is-selected .card-visual {
        padding: 14px 18px;
      }

      #join.is-selected .card-visual,
      #products.is-selected .card-visual,
      #awards.is-selected .card-visual {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
      }

      #join.is-selected .card-visual strong,
      #products.is-selected .card-visual strong,
      #awards.is-selected .card-visual strong {
        font-size: clamp(1.5rem, 7.5vw, 2.1rem);
        line-height: 1;
        letter-spacing: -.04em;
      }

      /* 標題列上的直排換行改成橫排 */
      #join.is-selected .card-visual strong br,
      #products.is-selected .card-visual strong br,
      #awards.is-selected .card-visual strong br { display: none; }

      .card-body,
      .event-card.is-selected .card-body {
        padding: 18px;
        margin: 0;
        border-radius: 0;
      }

      /* 手機版：隱藏重複標題，FUNDAY 副標升為主標 */
      .card-title-hide { display: none; }

      /* 手機版：折行標題行距放寬一些，不要太擠 */
      .event-card.is-selected .card-body h2,
      .event-card.is-selected .card-body h3,
      #products.is-selected .funday-subhead strong {
        line-height: 1.3;
      }

      #products.is-selected .funday-subhead {
        margin: 0;
      }

      /* FUNDAY「什麼是…」字級一致 */
      #products.is-selected .funday-subhead strong {
        font-size: clamp(1.8rem, 3.2vw, 3.2rem);
        line-height: 1.02;
        letter-spacing: -.04em;
        font-weight: 900;
      }

      /* FUNDAY 底部按鈕平行置中 */
      #products.is-selected .card-footer {
        justify-content: center;
      }

      /* 姓名／學號、系級三欄在窄螢幕改為單欄堆疊 */
      .name-pair,
      .info-trio,
      .friend-trio { grid-template-columns: 1fr; }

      /* 右上角 CTA 在手機版縮小 */
      .card-cta-top {
        top: 12px;
        right: 12px;
      }

      .card-cta-top.pill-btn {
        padding: 8px 14px;
        font-size: .82rem;
      }

    }

    /* ===== 楓葉飄落特效（底圖靜止，只有葉子在動；僅放大卡片顯示） ===== */
    #details .card-visual .leaves,
    #join .card-visual .leaves,
    #products .card-visual .leaves,
    #awards .card-visual .leaves {
      position: absolute;
      inset: 0;
      z-index: 2;
      overflow: hidden;
      pointer-events: none;
    }

    .event-card:not(.is-selected) .leaves { display: none; }

    .leaf {
      position: absolute;
      top: 0;
      width: 64px;
      height: 64px;
      will-change: transform;
      transform: translateZ(0);
      backface-visibility: hidden;
      animation: leafFall linear infinite;
    }

    .leaf img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      opacity: .82;
      filter: saturate(.62) brightness(.97) sepia(.2);
      backface-visibility: hidden;
      will-change: transform;
      animation: leafSway 6s ease-in-out infinite alternate;
    }

    .leaf.sway-b img {
      animation-name: leafSwayB;
      animation-duration: 7.5s;
    }

    @keyframes leafFall {
      0%   { transform: translate3d(0, -150px, 0); }
      100% { transform: translate3d(0, 108vh, 0); }
    }

    @keyframes leafSway {
      0%   { transform: translate3d(-16px, 0, 0) rotate(-24deg); }
      100% { transform: translate3d(18px, 0, 0) rotate(22deg); }
    }

    @keyframes leafSwayB {
      0%   { transform: translate3d(-22px, 0, 0) rotate(14deg); }
      100% { transform: translate3d(20px, 0, 0) rotate(-30deg); }
    }

    @media (prefers-reduced-motion: reduce) {
      .leaves { display: none !important; }
    }

    .ended-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
      margin-top: 4px;
    }

    .guide-text .guide-hl {
      display: block;
      margin-top: 6px;
      color: #ffd7a3;
      font-weight: 700;
    }

    .guide-text .guide-hl a {
      color: #ffb055;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .guide-text .guide-hl-lead {
      margin-top: 0;
      margin-bottom: 4px;
    }

    .guide-text .guide-hl a { white-space: nowrap; }
    .guide-text .guide-link { white-space: nowrap; }

    .guide-welcome .promo-inner { position: relative; }

    .guide-welcome-close {
      position: absolute;
      top: 10px;
      right: 12px;
      width: 32px;
      height: 32px;
      border: 0;
      border-radius: 50%;
      background: transparent;
      color: var(--muted);
      font-size: 1.3rem;
      line-height: 1;
      cursor: pointer;
    }

    .guide-welcome-close:hover { background: rgba(255,255,255,.1); color: var(--text); }

    .guide-welcome-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 6px;
    }

    .guide-welcome-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 12px 18px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.06);
      color: var(--text);
      font-family: inherit;
      font-size: 1rem;
      font-weight: 800;
      cursor: pointer;
      transition: background .18s ease, border-color .18s ease, transform .18s ease;
    }

    .guide-welcome-btn small {
      font-size: .78rem;
      font-weight: 600;
      color: var(--muted);
    }

    .guide-welcome-btn:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }

    .guide-welcome-btn.primary {
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      border-color: transparent;
      color: #fff;
    }

    .guide-welcome-btn.primary small { color: rgba(255,255,255,.88); }
    .guide-welcome-btn.primary:hover { filter: brightness(1.06); }
