/* Instagram 動態區，由主頁及課堂與比賽精華頁共用。 */
.instagram-feed { margin: 64px 0; min-width: 0; border-top: 1px solid var(--line, #303039); padding-top: 40px; }
.ig-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.ig-heading h2 { font-size: clamp(25px, 4vw, 38px); margin: 0; }
.ig-link { color: #ff79bd; text-decoration: none; font-weight: 700; }
.ig-status { color: #b8bfd0; margin: 18px 0; }
.ig-controls { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 16px; }
.ig-controls[hidden] { display: none; }
.ig-arrow, .ig-close { min-width: 44px; min-height: 44px; border: 1px solid #706074; background: #20141e; color: #fff; cursor: pointer; border-radius: 0; }
.ig-arrow:disabled { opacity: .35; cursor: default; }
.ig-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-color: #f00086 #19151b; padding: 4px 2px 18px; overscroll-behavior-x: contain; }
.ig-card { flex: 0 0 calc((100% - 40px) / 3); min-width: 0; border: 1px solid #40313e; background: #15141b; color: #fff; padding: 0; text-align: left; cursor: pointer; scroll-snap-align: start; border-radius: 0; font: inherit; }
.ig-card:hover { border-color: #ff008b; }
.ig-cover { position: relative; aspect-ratio: 4 / 5; background: #211923; overflow: hidden; display: grid; place-items: center; }
.ig-cover img { width: 100%; height: 100%; object-fit: cover; }
.ig-badge { position: absolute; bottom: 12px; left: 12px; padding: 5px 10px; background: #09080cdd; font-size: 13px; }
.ig-card-body { padding: 18px; }
.ig-date { color: #b8bfd0; font-size: 13px; }
.ig-caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 3em; line-height: 1.5; margin: 10px 0 0; }
.ig-dialog { color: #fff; background: #121017; border: 1px solid #735069; padding: 58px 22px 24px; width: min(900px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: 90dvh; overflow-y: auto; box-sizing: border-box; }
.ig-dialog::backdrop { background: #000c; }
.ig-close { position: absolute; top: 7px; right: 10px; }
.ig-stage { position: relative; display: grid; place-items: center; min-height: 120px; background: #050506; }
.ig-stage img, .ig-stage video { display: block; max-width: 100%; max-height: 60dvh; object-fit: contain; }
.ig-stage img[hidden] { display: none; }
.ig-play { position: absolute; background: #ff008b; color: #fff; font-weight: 700; padding: 14px 22px; border: 0; cursor: pointer; }
.ig-album-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 12px; }
.ig-caption-full { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.ig-fallback { padding: 20px; text-align: center; color: #c9bbcb; }
.instagram-feed :focus-visible { outline: 3px solid #ff79bd; outline-offset: 3px; }
@media(max-width: 700px) { .ig-card { flex-basis: 86%; } .ig-track { gap: 14px; } .instagram-feed { margin-top: 40px; } .ig-dialog { padding-left: 12px; padding-right: 12px; } }
@media(prefers-reduced-motion: reduce) { .ig-track { scroll-behavior: auto; } }
