/**
 * Gallery Minimal — 白盒子畫廊設計系統 v2
 * ==================
 * 藝術總監精修版：呼吸感、藝術張力、莫蘭迪色
 * 靈感：瑞士設計、無印良品、White Cube 畫廊
 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== Design Tokens ===== */
:root {
    --bg: #FAFAF7;
    --bg-alt: #F0EFEB;
    --text: #2A2A2A;
    --text-muted: #888;
    --text-dim: #999;
    --text-ghost: #B5B2AB;
    --accent: #2A2A2A;
    --accent-gold: #c5a059;
    --hairline: #E0DED8;
    --hairline-light: #EDEBE6;
    --font-serif: 'Noto Serif TC', 'Playfair Display', Georgia, serif;
    --font-display: 'Playfair Display', 'Noto Serif TC', serif;
    --font-sans: 'Noto Sans TC', -apple-system, sans-serif;
    --font-number: 'Playfair Display', Georgia, serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-serif);
    font-weight: 300;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); }

/* ===== Container ===== */
.gm-container { max-width: 1060px; margin: 0 auto; padding: 0 40px; }

@media (max-width: 768px) {
    .gm-container { padding: 0 24px; }
}

/* ===================================================
   7. Navigation — 磨砂玻璃 (Frosted Glass on Scroll)
   =================================================== */
.gm-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline);
    background: var(--bg);
    transition: background 0.4s var(--ease),
                border-color 0.4s var(--ease),
                backdrop-filter 0.4s var(--ease),
                padding 0.4s var(--ease);
}
.gm-nav.scrolled {
    background: rgba(250, 250, 247, 0.82);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom-color: var(--hairline-light);
    padding: 12px 0;
}
/* Scroll Progress Bar — 極細黑線隨捲動延伸 */
.gm-nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--text);
    transition: none;
    will-change: width;
}
.gm-nav .gm-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gm-nav-links { display: flex; gap: 36px; align-items: center; }
.gm-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    transition: color 0.3s var(--ease);
}
.gm-nav-links a:hover,
.gm-nav-links a.active { color: var(--text); }

/* ===================================================
   1. Hero — 呼吸感 (Space & Rhythm)
   =================================================== */
.gm-hero {
    padding: clamp(40px, 7vh, 112px) 0 clamp(64px, 8vh, 92px);
    text-align: center;
}

/* ── Hero Compact (Filter Flow) ── */
.gm-hero--compact {
    padding: 32px 0 24px;
    text-align: left;
}
.gm-hero--compact h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-family: var(--font-serif);
    font-weight: 400;
    margin-bottom: 0;
    display: inline;
}

/* ── 靈魂標語引擎 (Daily Resonance) ── */
.gm-hero--compact h1.slogan-enter {
    animation: sloganFadeIn 1.2s var(--ease-out-expo) both;
}
@keyframes sloganFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .gm-hero--compact h1.slogan-enter { animation: none !important; }
    .gm-fade-in { transition: none !important; }
    .gm-event-card, .gm-ranking-item { transition: none !important; }
}
.gm-hero-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 20px;
}
.gm-hero-stat {
    font-family: var(--font-serif);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.gm-hero-stat strong {
    font-family: var(--font-number);
    font-style: italic;
    font-weight: 400;
}

/* ── Filter Chips — 去框化，字體優先 (Frameless Typography) ── */
.gm-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.gm-fchip {
    position: relative;
    padding: 8px 14px;
    border: none;
    background: none;
    font-family: var(--font-serif);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: var(--text-ghost);
    cursor: pointer;
    transition: color 0.4s var(--ease);
    user-select: none;
}
/* 金色附點 — 樂譜般的 active 標記 */
.gm-fchip::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-gold);
    transition: transform 0.4s var(--ease-out-expo);
}
.gm-fchip:hover {
    color: var(--text-muted);
}
.gm-fchip.active {
    color: var(--text);
    font-weight: 700;
}
.gm-fchip.active::after {
    transform: translateX(-50%) scale(1);
}
.gm-fchip--search {
    text-decoration: none;
    color: var(--text-dim);
}
.gm-fchip--search:hover {
    color: var(--text);
}

/* 2. Typography — 動態字級 & 細節精緻化 */
.gm-hero-overline {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 6px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: clamp(20px, 3vh, 36px);
}
.gm-hero h1 {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 5.2rem);
    line-height: 1.1;
    margin-bottom: clamp(24px, 3vh, 36px);
    color: var(--text);
}
.gm-hero h1 em {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
}
.gm-hero-sub {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 440px;
    margin: 0 auto clamp(36px, 5vh, 56px);
}

/* ===================================================
   4. Search Bar — 底線動態 (Expanding Underline)
   =================================================== */
.gm-search-bar {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}
.gm-search-bar input {
    width: 100%;
    padding: 16px 40px 16px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--hairline);
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 300;
    outline: none;
    transition: border-color 0.3s var(--ease);
}
.gm-search-bar input::placeholder { color: var(--text-dim); }
.gm-search-bar input:focus { border-bottom-color: var(--hairline); }
/* 擴散底線動畫 — 從中央向外延伸 */
.gm-search-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transition: transform 0.5s var(--ease-out-expo);
}
.gm-search-bar:focus-within::after {
    transform: scaleX(1);
}
/* 搜尋箭頭 Hover 水平位移 */
.gm-search-bar button {
    position: absolute;
    right: 0;
    bottom: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.gm-search-bar button:hover {
    color: var(--text);
    transform: translateX(5px);
}

/* Hero CTA */
.gm-hero-cta {
    margin-top: clamp(24px, 3vh, 40px);
    text-align: center;
}
.gm-hero-cta-btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-serif);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--text-ghost);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.gm-hero-cta-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--text-muted);
    color: var(--text);
}

/* 統計 — 中軸對稱單行標籤 (Symmetric Stats Bar) */
.gm-hero-stats {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
    max-width: 600px;
    margin: 32px auto 0;
}
.gm-stat-item {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.gm-stat-item:first-child { text-align: right; }
.gm-stat-item:last-child { text-align: left; }
.gm-stat-item:hover {
    color: var(--text);
    transform: scale(1.02);
}
.gm-stat-item strong {
    font-family: var(--font-number);
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
}
.gm-stat-divider {
    width: 1px;
    height: 14px;
    background: var(--text-ghost);
    margin: 0 20px;
    align-self: center;
    transform: translateY(3px);
}

/* ===================================================
   1. Section — 段落留白 120px (Breathing Space)
   =================================================== */
.gm-section { padding: 96px 0; }
.gm-section-alt { background: var(--bg-alt); }
.gm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 64px;
}
.gm-section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: 1.8rem;
    color: var(--text);
}
/* Featured 主區塊 — 強化標題層級 */
.gm-section--primary { padding-top: clamp(40px, 5vh, 64px); }
.gm-section--primary .gm-section-title {
    font-size: 2.4rem;
}
.gm-section-overline {
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 4px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gm-section-link {
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 2px;
    transition: all 0.3s var(--ease);
}
.gm-section-link:hover { color: var(--text); border-color: var(--text); }

/* ===================================================
   Cards — 白對白層次 & 非對稱節奏 (White-on-White & Asymmetric Rhythm)
   =================================================== */
.gm-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
}
/* 非對稱網格：第一張卡片破格處理 — 視覺主位 (Dominance) */
.gm-section--primary .gm-card-grid > .gm-event-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}
.gm-section--primary .gm-card-grid > .gm-event-card:first-child .gm-card-poster {
    aspect-ratio: 4/5;
}
.gm-section--primary .gm-card-grid > .gm-event-card:first-child .gm-card-title {
    font-size: 1.4rem;
}
.gm-section--primary .gm-card-grid > .gm-event-card:first-child .gm-card-date {
    font-size: 0.8rem;
    letter-spacing: 3px;
}
.gm-event-card {
    text-decoration: none;
    color: inherit;
    display: block;
}
/* 白對白層次 — 零陰影，純色階 (Zero Shadow, Pure Tonality) */
.gm-card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    margin-bottom: 20px;
    background: #FFFFFF;
    border: 1px solid var(--hairline-light);
    box-shadow: none;
}
/* 海報質感 — 柔化灰階 + 液態超強緩動 */
.gm-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}
.gm-event-card:hover .gm-card-poster img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* ===================================================
   6. 無圖卡片 — 莫蘭迪色系 + 幾何裝飾
   =================================================== */
.gm-card-poster-gen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 32px;
    position: relative;
    overflow: hidden;
    /* 預設背景由 JS 設定 inline style (莫蘭迪色) */
}
/* 裝飾符號 — 由 data-symbol 屬性控制 */
.gm-card-poster-gen::before {
    content: attr(data-symbol);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: rgba(0,0,0,0.04);
    pointer-events: none;
    line-height: 1;
}
.gm-card-poster-gen .gen-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text);
    position: relative;
    z-index: 1;
}
.gm-card-poster-gen .gen-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

/* card-date — 牛皮紙手稿般的日期 */
.gm-card-date {
    font-family: var(--font-number);
    font-size: 0.72rem;
    font-style: italic;
    color: var(--text-ghost);
    letter-spacing: 2px;
    font-weight: 400;
    margin-bottom: 6px;
}
.gm-card-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 4px;
}
.gm-card-meta {
    font-family: var(--font-serif);
    font-size: 0.78rem;
    color: var(--text-muted);
}
.gm-card-blurb {
    font-family: var(--font-serif);
    font-size: 0.72rem;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 6px;
    line-height: 1.5;
}
.gm-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.gm-card-tag {
    font-family: var(--font-serif);
    font-size: 0.62rem;
    color: var(--text-ghost);
    border: none;
    padding: 0;
    letter-spacing: 1px;
}
.gm-card-tag::before {
    content: '#';
    opacity: 0.5;
}

/* ===== Ranking ===== */
.gm-ranking-list { max-width: 700px; }
.gm-ranking-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--hairline);
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.3s var(--ease), border-color 0.3s var(--ease);
}
.gm-ranking-item:hover { padding-left: 8px; }
.gm-ranking-item:last-child { border-bottom-color: transparent; }
.gm-ranking-num {
    font-family: var(--font-number);
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-dim);
}
.gm-ranking-item:first-child .gm-ranking-num { color: var(--text); }
.gm-ranking-item-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 700;
}
.gm-ranking-item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.gm-ranking-clicks {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-number);
    font-style: italic;
}

/* ===================================================
   Search Page — 一致呼吸感
   =================================================== */
.gm-search-page {
    padding: 100px 0 60px;
}
.gm-search-page-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 56px;
    text-align: center;
}
.gm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--hairline);
}
.gm-filter-group {
    flex: 1;
    min-width: 140px;
    position: relative;
}
.gm-filter-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.gm-filter-input,
.gm-filter-select {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--hairline);
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 300;
    outline: none;
    transition: border-color 0.3s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}
.gm-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23BBB'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 20px;
}
/* 搜尋頁篩選框也有擴散底線 */
.gm-filter-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transition: transform 0.4s var(--ease-out-expo);
}
.gm-filter-group:focus-within::after {
    transform: scaleX(1);
}
.gm-filter-input:focus,
.gm-filter-select:focus {
    border-bottom-color: var(--hairline);
}
.gm-filter-input::placeholder { color: var(--text-dim); }

.gm-filter-btn {
    padding: 14px 28px;
    background: var(--text);
    color: var(--bg);
    border: none;
    font-family: var(--font-serif);
    font-size: 0.78rem;
    letter-spacing: 3px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s var(--ease);
}
.gm-filter-btn:hover { opacity: 0.7; }

/* ===== Chip Filters ===== */
.gm-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.gm-chip {
    position: relative;
    padding: 8px 12px;
    border: none;
    background: none;
    font-family: var(--font-serif);
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s var(--ease);
    user-select: none;
}
.gm-chip:hover { color: var(--text); }
.gm-chip.active { color: var(--text); font-weight: 700; }
.gm-chip-tag {
    position: relative;
    padding: 6px 10px;
    border: none;
    background: none;
    font-family: var(--font-serif);
    font-size: 0.72rem;
    color: var(--text-ghost);
    cursor: pointer;
    transition: color 0.3s var(--ease);
    user-select: none;
}
.gm-chip-tag:hover { color: var(--text-muted); }
.gm-chip-tag.active { color: var(--text); font-weight: 700; }

/* ===== Price Range ===== */
.gm-price-range {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}
.gm-price-range .gm-filter-label {
    margin-bottom: 0;
    margin-right: 4px;
}
.gm-price-input {
    width: 100px;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--hairline);
    color: var(--text);
    font-family: var(--font-number);
    font-size: 0.85rem;
    font-weight: 300;
    font-style: italic;
    outline: none;
    transition: border-color 0.3s var(--ease);
    -moz-appearance: textfield;
}
.gm-price-input::-webkit-outer-spin-button,
.gm-price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gm-price-input:focus { border-bottom-color: var(--text); }
.gm-price-input::placeholder { color: var(--text-dim); }
.gm-price-sep { color: var(--text-ghost); font-size: 0.8rem; }
.gm-price-unit { color: var(--text-dim); font-size: 0.75rem; }

.gm-search-status {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 48px;
}
.gm-search-status h2 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
}
.gm-search-status span {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ===== Pagination ===== */
.gm-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 64px 0;
}
.gm-pagination a,
.gm-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: var(--font-number);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s var(--ease);
}
.gm-pagination a:hover { color: var(--text); border-bottom-color: var(--hairline); }
.gm-pagination .active { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.gm-pagination .disabled { color: var(--text-dim); pointer-events: none; }

/* ===================================================
   Event Detail Page — 一致呼吸感
   =================================================== */
.gm-event-detail {
    padding: 80px 0 120px;
}
.gm-back-link {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 56px;
    transition: color 0.3s var(--ease);
}
.gm-back-link:hover { color: var(--text); }

.gm-event-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 72px;
    align-items: start;
}
.gm-event-poster {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid var(--hairline-light);
    box-shadow: none;
}
.gm-event-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 詳情頁的無圖海報 — 莫蘭迪色 */
.gm-event-poster-gen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}
.gm-event-poster-gen::before {
    content: attr(data-symbol);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12rem;
    color: rgba(0,0,0,0.04);
    pointer-events: none;
    line-height: 1;
}
.gm-event-poster-gen .gen-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text);
    position: relative;
    z-index: 1;
}
.gm-event-poster-gen .gen-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.gm-event-title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 28px;
}
.gm-event-blurb {
    font-size: 0.92rem;
    color: var(--text-dim);
    font-style: italic;
    font-family: var(--font-serif);
    margin-bottom: 24px;
    line-height: 1.6;
}
.gm-event-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 36px;
}
.gm-tag {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 12px;
    border: 1px solid var(--hairline);
    color: var(--text-muted);
}
.gm-tag-free { border-color: var(--text); color: var(--text); }

.gm-event-info {
    margin-bottom: 44px;
}
.gm-event-info-row {
    display: flex;
    padding: 18px 0;
    border-bottom: 1px solid var(--hairline);
}
.gm-event-info-label {
    width: 100px;
    flex-shrink: 0;
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    font-weight: 500;
    text-transform: uppercase;
    padding-top: 2px;
}
.gm-event-info-value {
    font-size: 0.95rem;
    color: var(--text);
}

/* 購票按鈕 */
.gm-event-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 36px;
}
.gm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-serif);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--text);
    color: var(--bg);
    background: var(--text);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}
.gm-btn:hover { opacity: 0.7; color: var(--bg); }
.gm-btn-outline {
    background: transparent;
    color: var(--text);
}
.gm-btn-outline:hover { background: var(--text); color: var(--bg); opacity: 1; }
.gm-btn i { margin-right: 8px; }

/* ── 動作群組 (精品級佈局) ── */
.gm-event-actions-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--hairline);
}

/* 核心動作列：水平並列 */
.gm-action-row {
    display: flex;
    gap: 12px;
}
.gm-action-primary {
    flex: 1;
    display: flex;
    gap: 8px;
}
.gm-action-planning {
    flex: 1;
    display: flex;
}

/* 動作按鈕共用 — 精品工藝 */
.gm-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    height: 46px;
    padding: 0 20px;
    background: none;
    border: 1px solid var(--hairline);
    color: var(--text-muted);
    font-family: var(--font-serif);
    font-size: 0.85rem;
    letter-spacing: 2px;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.gm-action-btn:hover { border-color: var(--text); color: var(--text); }
.gm-action-btn[data-active="true"],
.gm-action-btn.is-favorited { border-color: #c5a059; color: #c5a059; }
.gm-action-btn.is-favorited:hover { border-color: #c5a059; color: #c5a059; }

/* 日曆 Dropdown — 帶動畫 */
.gm-cal-dropdown { position: relative; flex: 1; display: flex; }
.gm-cal-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--hairline);
    box-shadow: none;
    z-index: 10;
    min-width: 180px;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.gm-cal-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.gm-cal-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: var(--font-serif);
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}
.gm-cal-option:hover { color: var(--text); background: rgba(0,0,0,0.02); }
a.gm-cal-option { display: flex; }

/* 社交幽靈圖標 — 安靜的背景 */
.gm-action-social {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}
.gm-social-icon {
    padding: 0;
    border: none;
    background: none;
    color: #D2D0CA;
    font-size: 0.88rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s var(--ease);
}
.gm-social-icon:hover { color: var(--text); }

/* 場次表格 */
.gm-sessions {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--hairline);
}
.gm-sessions-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 28px;
}
.gm-sessions-table {
    width: 100%;
    border-collapse: collapse;
}
.gm-sessions-table th {
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 16px 12px 0;
    border-bottom: 1px solid var(--hairline);
    text-align: left;
    font-weight: 500;
}
.gm-sessions-table td {
    font-size: 0.88rem;
    padding: 16px 16px 16px 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--text);
}

/* 活動說明 */
.gm-description {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--hairline);
}
.gm-description-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 28px;
}
.gm-description-body {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text);
}

/* ===== Footer ===== */
.gm-footer {
    padding: 72px 0;
    border-top: 1px solid var(--hairline);
    text-align: center;
}
.gm-footer-signature {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 400;
    color: #8A867F;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.8;
}
.gm-footer-signature strong {
    font-weight: 900;
}
.gm-footer-legal {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.65rem;
    color: #D2D0CA;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s var(--ease);
}
.gm-footer-legal:hover { color: var(--text-muted); }

/* ===== Search Keyword Highlight — 香檳金策展高亮 ===== */
mark.gm-highlight {
    background: rgba(210, 195, 160, 0.28);
    color: inherit;
    padding: 1px 3px;
    border-radius: 1px;
}

/* ===== Empty States ===== */

/* ── Reveal Animation ── */
.gm-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}
.gm-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}
/* Poster bloom: blur → focus */
.gm-reveal-poster img {
    filter: blur(12px);
    transform: scale(1.03);
    transition: filter 0.6s 0.2s var(--ease-out-expo), transform 0.8s 0.2s var(--ease-out-expo);
}
.gm-reveal-poster.is-revealed img {
    filter: blur(0);
    transform: scale(1);
}
/* Generative poster (no blur needed) */
.gm-reveal-poster .gm-event-poster-gen {
    opacity: 0;
    transition: opacity 0.6s 0.2s var(--ease-out-expo);
}
.gm-reveal-poster.is-revealed .gm-event-poster-gen {
    opacity: 1;
}
.gm-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--text-dim);
}
.gm-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
}

/* ===================================================
   5. Fade In — 液態流動 (Liquid Motion)
   =================================================== */
.gm-fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
}
.gm-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .gm-event-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .gm-event-poster {
        max-width: 380px;
    }
}

@media (max-width: 768px) {
    .gm-card-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    /* 平板：取消非對稱，回到等寬 */
    .gm-section--primary .gm-card-grid > .gm-event-card:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
    .gm-section--primary .gm-card-grid > .gm-event-card:first-child .gm-card-poster {
        aspect-ratio: 16/9;
    }
    .gm-hero { padding: clamp(48px, 8vh, 80px) 0 56px; }
    .gm-hero--compact { padding: 24px 0 16px; }
    .gm-hero-header { flex-direction: column; gap: 4px; }
    .gm-hero--compact h1 { font-size: 1.4rem; display: block; }
    .gm-fchip { padding: 6px 10px; font-size: 0.68rem; letter-spacing: 1px; }
    .gm-hero-stats { max-width: 480px; }
    .gm-stat-divider { margin: 0 12px; }
    .gm-section { padding: 64px 0; }
    .gm-section--primary { padding-top: 48px; }
    .gm-section--primary .gm-section-title { font-size: 2rem; }
    .gm-action-row { flex-direction: column; gap: 8px; }
    .gm-action-primary { gap: 8px; }
    .gm-action-btn { height: 42px; font-size: 0.8rem; letter-spacing: 1px; }
    .gm-search-page { padding: 72px 0 40px; }
    .gm-filters { gap: 16px; }
    .gm-filter-group { min-width: 120px; }
    .gm-chip-row { gap: 6px; }
    .gm-chip { padding: 5px 10px; font-size: 0.72rem; }
    .gm-chip-tag { padding: 4px 10px; font-size: 0.68rem; }
    .gm-price-range { flex-wrap: wrap; }
    /* 手機對比強化 */
    .gm-card-date { font-size: 0.74rem; }
    .gm-card-meta { font-size: 0.8rem; }
    .gm-ranking-num { font-size: 1.3rem; }
    /* 手機導覽 — 縮減間距 */
    .gm-nav { padding: 16px 0; }
    .gm-nav.scrolled { padding: 10px 0; }
    .gm-nav-links { gap: 24px; }
}

@media (max-width: 480px) {
    .gm-card-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
    /* 手機：完全取消非對稱 */
    .gm-section--primary .gm-card-grid > .gm-event-card:first-child {
        grid-column: span 1;
        grid-row: span 1;
    }
    .gm-section--primary .gm-card-grid > .gm-event-card:first-child .gm-card-poster {
        aspect-ratio: 3/4;
    }
    .gm-section--primary .gm-card-grid > .gm-event-card:first-child .gm-card-title {
        font-size: 1rem;
    }
    /* 手機導覽 — 緊湊排列 */
    .gm-nav { padding: 12px 0; }
    .gm-nav.scrolled { padding: 8px 0; }
    .gm-nav-links { gap: 16px; }
    .gm-nav-links a { font-size: 0.68rem; }
    .gm-hero h1 { font-size: 2.2rem; }
    .gm-hero-cta-btn { padding: 10px 24px; font-size: 0.78rem; }
    .gm-hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
    .gm-stat-divider { display: none; }
    .gm-section-header { flex-direction: column; gap: 12px; }
}

/* ===================================================
   Nav Divider + User Avatar + Studio Invite
   =================================================== */
.gm-nav-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-ghost);
    align-self: center;
}

/* ── Nav Support Link (gold dot) ── */
.gm-nav-support { position: relative; }
.gm-nav-gold-dot {
    position: absolute;
    top: -1px; right: -7px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent-gold);
}

/* ── Nav User Avatar ── */
.gm-nav-user { display: flex; align-items: center; }
.gm-nav-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    overflow: hidden; text-decoration: none;
    background: var(--hairline);
    transition: box-shadow 0.3s var(--ease);
}
.gm-nav-avatar:hover { box-shadow: 0 0 0 2px var(--text-ghost); }
.gm-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gm-nav-avatar span {
    font-family: var(--font-serif); font-size: 0.72rem;
    color: var(--text-muted); line-height: 1;
}

/* ── Patron Halo Ring ── */
.gm-nav-halo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.gm-nav-halo .gm-nav-avatar {
    width: 26px; height: 26px;
}
.gm-nav-halo .gm-nav-avatar span { font-size: 0.62rem; }
.gm-nav-halo-bronze { border-color: #cd7f32; }
.gm-nav-halo-silver { border-color: #C0C0C0; }
.gm-nav-halo-gold   { border-color: #D4AF37; box-shadow: 0 0 8px rgba(212,175,55,0.25); }

.gm-studio-invite {
    padding: clamp(64px, 10vh, 100px) 0;
    border-top: 1px solid var(--hairline);
    text-align: center;
}

.gm-studio-invite-inner {
    max-width: 480px;
    margin: 0 auto;
}

.gm-studio-invite-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-top: 20px;
    margin-bottom: 16px;
}

.gm-studio-invite-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 32px;
}

.gm-studio-invite-link {
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--hairline);
    transition: border-color 0.3s var(--ease);
}

.gm-studio-invite-link:hover {
    border-bottom-color: var(--text);
}

/* ===================================================
   The Digital Crate — 票根收藏系統
   =================================================== */

/* ── 卡片票根按鈕 ── */
.gm-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-muted);
    z-index: 2;
    padding: 0;
    line-height: 1;
}
.gm-event-card:hover .gm-fav-btn,
.gm-fav-btn.is-favorited { opacity: 1; }
.gm-fav-btn.is-favorited { color: #c5a059; }
.gm-fav-btn:hover { transform: scale(1.15); }

/* 打孔動畫 — punch effect */
@keyframes crate-punch {
    0%   { transform: scale(1); }
    20%  { transform: scale(0.7) rotate(-8deg); }
    40%  { transform: scale(1.3) rotate(4deg); }
    60%  { transform: scale(0.95) rotate(-2deg); }
    80%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.gm-fav-btn.is-punching {
    animation: crate-punch 0.5s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

/* 飛入動畫 — 海報快照飛向 crate icon */
.gm-fly-clone {
    position: fixed;
    width: 48px;
    height: 48px;
    z-index: 9999;
    border-radius: 4px;
    overflow: hidden;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    transition: none;
}
.gm-fly-clone.is-flying {
    width: 20px;
    height: 20px;
    transform: translate(var(--fly-dx), var(--fly-dy));
    transition: all 0.65s cubic-bezier(0.2, 1, 0.3, 1);
    opacity: 0;
    border-radius: 50%;
}

/* ── 詳情頁珍藏按鈕（由 favorites.js 注入到 .gm-action-primary） ── */
/* active 狀態已在 .gm-action-btn.is-favorited 中定義 */

/* ── 收藏成功 Toast（出現在 crate icon 正下方）── */
.gm-cal-toast {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #FFF;
    border: 1px solid var(--hairline);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: var(--text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    white-space: nowrap;
    border-radius: 2px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
    pointer-events: none;
    z-index: 100;
}
.gm-cal-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Navbar Crate 圖標 ── */
.gm-crate-link {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.3s var(--ease);
}
.gm-crate-link:hover { color: #c5a059; }
.gm-crate-link.is-punching {
    animation: crate-punch 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}
.gm-crate-count {
    position: absolute;
    top: -5px;
    right: -9px;
    background: #c5a059;
    color: #FFF;
    font-size: 0.55rem;
    font-weight: 500;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
}

/* ── Profile — 票根牆 ── */
.gm-crate-section { margin-top: 48px; }

.gm-crate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.gm-crate-stub {
    position: relative;
    display: block;
    background: #FFF;
    overflow: visible;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.25s var(--ease);
}
.gm-crate-stub:hover { transform: translateY(-3px); }

/* 票根穿孔 — 右側鋸齒邊緣 (mask-image) */
.gm-crate-stub::after {
    content: '';
    position: absolute;
    top: 0;
    right: -6px;
    width: 12px;
    height: 100%;
    background: var(--bg, #FAFAF7);
    -webkit-mask-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 4px,
        #000 4px,
        #000 8px
    );
    mask-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 4px,
        #000 4px,
        #000 8px
    );
    pointer-events: none;
}
/* 左側穿孔對稱 */
.gm-crate-stub::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px;
    width: 12px;
    height: 100%;
    background: var(--bg, #FAFAF7);
    -webkit-mask-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 4px,
        #000 4px,
        #000 8px
    );
    mask-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 4px,
        #000 4px,
        #000 8px
    );
    pointer-events: none;
    z-index: 1;
}

.gm-crate-stub-poster {
    aspect-ratio: 3/4;
    overflow: hidden;
    border-bottom: 1px dashed var(--hairline);
}
.gm-crate-stub-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gm-crate-stub-info {
    padding: 10px 12px 12px;
    position: relative;
}
.gm-crate-stub-serial {
    position: absolute;
    top: -10px;
    right: 10px;
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 0.62rem;
    font-weight: 400;
    color: #c5a059;
    letter-spacing: 0.5px;
    background: #FFF;
    padding: 0 4px;
}
.gm-crate-stub-title {
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
}
.gm-crate-stub-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gm-crate-empty {
    text-align: center;
    padding: 48px 0;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.gm-crate-empty a {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--hairline);
}
.gm-crate-empty a:hover { border-bottom-color: var(--text); }

/* ===================================================
   ── 漸進式承諾 Modal (Commitment Modal) ──
   =================================================== */
.gm-commit-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}
.gm-commit-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.gm-commit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.gm-commit-panel {
    position: relative;
    background: var(--bg, #FAF8F5);
    padding: 48px 40px 40px;
    max-width: 360px;
    width: calc(100% - 40px);
    text-align: center;
    transform: translateY(24px);
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}
.gm-commit-modal.is-open .gm-commit-panel {
    transform: translateY(0);
}
.gm-commit-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    opacity: 0.7;
}
.gm-commit-close:hover { opacity: 1; }
.gm-commit-icon {
    font-size: 2.4rem;
    color: #c5a059;
    margin-bottom: 20px;
    line-height: 1;
}
.gm-commit-overline {
    font-size: 0.6rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 14px;
}
.gm-commit-heading {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.35;
    margin: 0 0 14px;
    color: var(--text);
}
.gm-commit-body {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 28px;
}
.gm-commit-n {
    color: #c5a059;
    font-weight: 600;
}
.gm-commit-cta {
    display: block;
    padding: 13px 24px;
    background: var(--text, #1A1A1A);
    color: var(--bg, #FAF8F5);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 16px;
    transition: opacity 0.2s var(--ease);
}
.gm-commit-cta:hover { opacity: 0.8; color: var(--bg, #FAF8F5); }
.gm-commit-skip {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gm-commit-skip:hover { color: var(--text); }

/* ===================================================
   5. Accessibility — prefers-reduced-motion
   =================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .gm-fly-clone { display: none !important; }
    .gm-fade-in {
        opacity: 1;
        transform: none;
    }
    .gm-card-poster img {
        filter: grayscale(0%);
        transition: none;
    }
    .gm-nav {
        transition: none;
    }
    .gm-nav-progress {
        display: none;
    }
    .gm-search-bar::after,
    .gm-filter-group::after {
        transition: none;
        transform: scaleX(1);
        opacity: 0;
    }
    .gm-search-bar:focus-within::after,
    .gm-filter-group:focus-within::after {
        opacity: 1;
    }
}

/* ===================================================
   Ranking Page
   =================================================== */
.gm-ranking-page { padding: 100px 0 80px; }
.gm-ranking-page-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 4px;
}
.gm-ranking-page-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* Top 3 ranking badges */
.gm-ranking-card-wrap { position: relative; }
.gm-ranking-badge {
    position: absolute;
    top: -12px;
    left: -8px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-number);
    font-style: italic;
    font-size: 1.2rem;
    font-weight: 600;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
}
.gm-ranking-card-wrap[data-rank="1"] .gm-ranking-badge {
    background: var(--accent-gold);
    color: #fff;
    border-color: var(--accent-gold);
}
.gm-ranking-card-wrap[data-rank="2"] .gm-ranking-badge {
    background: var(--text-dim);
    color: #fff;
    border-color: var(--text-dim);
}
.gm-ranking-card-wrap[data-rank="3"] .gm-ranking-badge {
    background: var(--hairline);
    color: var(--text);
    border-color: var(--hairline);
}

.gm-ranking-top3 { margin-bottom: 40px; }

/* Full-width ranking list (wider than homepage version) */
.gm-ranking-list--full { max-width: 100%; }
.gm-ranking-list--full .gm-ranking-num { font-size: 1.5rem; }
.gm-ranking-list--full .gm-ranking-item { grid-template-columns: 50px 1fr auto; }
.gm-ranking-list--full .gm-ranking-item-title { font-size: 1rem; }

@media (max-width: 640px) {
    .gm-ranking-page { padding: 80px 0 60px; }
    .gm-ranking-page-title { font-size: 1.8rem; }
    .gm-ranking-badge { width: 30px; height: 30px; font-size: 1rem; top: -8px; left: -6px; }
    .gm-ranking-list--full .gm-ranking-num { font-size: 1.3rem; }
    .gm-ranking-list--full .gm-ranking-item { grid-template-columns: 40px 1fr auto; }
}
