/* =============================================================
   版型一：金碧輝煌 Imperial — 紅金漆黑、對稱置中的殿堂氣勢
   ============================================================= */
.t-imperial {
    --t-bg: #140908;
    --t-bg2: #2a0e0b;
    --t-card: #1f0d0a;
    --t-fg: #f3e6c8;
    --t-fg2: #bca98a;
    --t-line: rgba(224, 176, 79, .28);
    --t-accent: #e0b04f;
    --t-accent2: #f4cf7a;
    --t-btn-bg: linear-gradient(140deg, #f6d98c, #e0b04f 45%, #a8772a);
    --t-btn-fg: #2a1505;
    --gold: #e0b04f;
    --gold-d: #a8772a;
    --red: #b3261e;
    --red-d: #6e130f;
    --paper: #f6ebd5;
    --ink: #2a170c;
    --fret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Cpath d='M0 18h16V4H6v8h6V8' fill='none' stroke='%23e0b04f' stroke-width='1.6'/%3E%3Cpath d='M20 2h16v14H26V8h6v4' fill='none' stroke='%23e0b04f' stroke-width='1.6'/%3E%3C/svg%3E");
}
.t-imperial .t-btn { box-shadow: 0 8px 22px rgba(224, 176, 79, .35); }
.t-imperial .t-btn.ghost { box-shadow: none; color: var(--gold); }
.t-imperial .t-chip { background: rgba(179, 38, 30, .9); color: #ffe3a3; }

/* ---------- 頁首 ---------- */
.im-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 102; background: linear-gradient(90deg, var(--red), var(--gold)); transform-origin: 0 50%; transform: scaleX(0); }
.im-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.im-header.scrolled { background: rgba(16, 7, 5, .9); backdrop-filter: blur(10px); border-color: rgba(224, 176, 79, .3); }
.im-header-in { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.im-brand { display: flex; align-items: center; gap: 12px; }
.im-seal, .im-logo { width: 46px; height: 46px; flex: none; border-radius: 8px; }
.im-seal { display: grid; place-items: center; background: linear-gradient(150deg, #c9302c, var(--red-d)); color: #ffe3a3; font: 900 24px var(--t-head); box-shadow: inset 0 0 0 2px rgba(255, 227, 163, .55), inset 0 0 0 5px var(--red-d); }
.im-logo { object-fit: cover; border: 2px solid var(--gold); }
.im-brand b { display: block; font: 700 21px var(--t-head); letter-spacing: .16em; color: #fbefcf; }
.im-brand small { display: block; font-size: 11.5px; letter-spacing: .24em; color: var(--gold); }
.im-nav { display: flex; gap: 4px; }
.im-nav a { padding: 8px 13px; font-size: 15px; letter-spacing: .1em; color: #ead8b2; position: relative; border-radius: 6px; transition: color .2s; }
.im-nav a::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .3s; }
.im-nav a:hover, .im-nav a.on { color: var(--gold); }
.im-nav a.on::after, .im-nav a:hover::after { transform: scaleX(1); }
.im-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.im-toggle i { width: 26px; height: 2px; background: var(--gold); display: block; }

.im-dots { position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 16px; }
.im-dots a { width: 11px; height: 11px; border: 1.5px solid var(--gold); transform: rotate(45deg); position: relative; transition: background .25s, transform .25s; background: rgba(20, 9, 8, .5); }
.im-dots a.on { background: var(--gold); transform: rotate(45deg) scale(1.25); }
.im-dots span { position: absolute; right: 22px; top: 50%; transform: rotate(-45deg) translate(0, -50%); transform-origin: right center; white-space: nowrap; font-size: 12px; letter-spacing: .15em; color: var(--gold); background: rgba(20, 9, 8, .85); padding: 3px 10px; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.im-dots a:hover span { opacity: 1; }

/* ---------- Hero ---------- */
.im-hero { position: relative; height: 100vh; min-height: 680px; overflow: hidden; background: #0c0404; display: grid; place-items: center; text-align: center; isolation: isolate; }
.im-sky { position: absolute; inset: -12% 0 0; background: radial-gradient(ellipse 80% 70% at 50% 28%, #6a1b14 0%, #2c0b09 45%, #0c0404 82%); z-index: -3; }
.im-photo { position: absolute; inset: -12% 0 0; background: center / cover no-repeat; opacity: .32; z-index: -3; mix-blend-mode: luminosity; }
.im-halo { position: absolute; top: 9%; left: calc(50% - min(36vw, 380px)); width: min(72vw, 760px); aspect-ratio: 1; border-radius: 50%; z-index: -2; background: radial-gradient(circle, rgba(244, 199, 106, .42), rgba(244, 199, 106, .1) 42%, transparent 68%); transition: translate .6s ease-out; }
.im-halo::before, .im-halo::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(224, 176, 79, .35); inset: 16%; animation: im-spin 160s linear infinite; }
.im-halo::after { inset: 24%; border-style: solid; border-color: rgba(224, 176, 79, .16); animation-duration: 240s; animation-direction: reverse; }
@keyframes im-spin { to { transform: rotate(360deg); } }
.im-embers, .im-smoke { position: absolute; left: 0; width: 100%; pointer-events: none; }
.im-embers { inset: 0; height: 100%; z-index: -1; }
.im-smoke { bottom: 0; height: 75%; z-index: 2; opacity: .9; }
.im-layer { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; transition: translate .6s ease-out; }
.im-far { height: 40%; display: flex; justify-content: space-between; align-items: flex-end; z-index: -1; color: #2c0d0a; }
.im-far .im-roof { width: 46%; height: auto; }
.im-far .r1 { margin-left: -6%; }
.im-far .r2 { margin-right: -6%; width: 52%; }
.im-main { height: 44%; z-index: 1; }
.im-main .hall { width: 100%; height: 100%; }
.im-hall .h-base { fill: #0a0303; }
.im-hall .h-base2 { fill: #140606; }
.im-hall .h-wall { fill: #1c0807; }
.im-hall .h-col { fill: #33100b; }
.im-hall .h-glow-in { stop-color: #ffc768; }
.im-hall .h-glow-out { stop-color: #a52a1a; }
.im-hall .h-door { filter: drop-shadow(0 0 30px rgba(255, 170, 70, .55)); }
.im-hall .h-frame { stroke: var(--gold); }
.im-hall .h-window { fill: rgba(255, 183, 90, .45); }
.im-hall .h-plaque { fill: #110505; stroke: var(--gold); }
.im-hall .h-plaque-text { fill: var(--gold); font-family: var(--t-head); font-weight: 700; letter-spacing: 4px; }
.im-hall .h-roof { fill: #070202; }
.im-hall .h-dot-0 { fill: var(--gold); } .im-hall .h-dot-1 { fill: #c9302c; } .im-hall .h-dot-2 { fill: #2f9c8a; } .im-hall .h-dot-3 { fill: #e98aa0; }

.im-lanterns { position: absolute; top: 64px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 7%; z-index: 3; pointer-events: none; transition: translate .6s ease-out; }
.im-lanterns .lantern { width: 54px; }
.im-lanterns .l1, .im-lanterns .l4 { width: 66px; margin-top: 40px; }
.im-lanterns .l2, .im-lanterns .l3 { width: 46px; margin-top: 90px; opacity: .85; }

.im-couplet { position: absolute; top: 20%; z-index: 4; width: 66px; padding: 22px 0; display: flex; flex-direction: column; align-items: center; background: linear-gradient(180deg, #c42c22, #8a1913); border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(138, 25, 19, .6), 0 20px 40px rgba(0, 0, 0, .5); transform-origin: 50% 0; transform: scaleY(0); }
.im-couplet span { font: 700 30px/1.3 var(--t-head); color: #ffd98a; text-shadow: 0 1px 0 #5c0c08; }
.im-couplet.left { left: 4.5%; }
.im-couplet.right { right: 4.5%; }
.im-couplet { animation: im-unroll 1.4s cubic-bezier(.3, .8, .2, 1) .5s forwards; }
.im-couplet.left { animation-delay: .75s; }
@keyframes im-unroll { to { transform: scaleY(1); } }

.im-hero-copy { position: relative; z-index: 5; margin-top: -20vh; padding: 0 20px; }
.im-kicker { color: var(--gold); letter-spacing: .6em; text-indent: .6em; font-size: 14px; margin-bottom: 18px; opacity: 0; }
.im-plaque { position: relative; display: inline-block; padding: 26px 64px 30px; background: linear-gradient(180deg, #24100b, #160806); border: 3px solid var(--gold); outline: 1px solid rgba(224, 176, 79, .5); outline-offset: 7px; box-shadow: 0 24px 70px rgba(0, 0, 0, .7), inset 0 0 40px rgba(0, 0, 0, .7); opacity: 0; }
.im-plaque .c { position: absolute; width: 14px; height: 14px; background: var(--gold); transform: rotate(45deg); }
.im-plaque .tl { top: -9px; left: -9px; } .im-plaque .tr { top: -9px; right: -9px; } .im-plaque .bl { bottom: -9px; left: -9px; } .im-plaque .br { bottom: -9px; right: -9px; }
.im-plaque h1 { font: 900 clamp(40px, 7.6vw, 92px)/1.15 var(--t-head); letter-spacing: .22em; text-indent: .22em; background: linear-gradient(180deg, #fff3c9 0%, #f1c86a 40%, #b47d2c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .55)); }
.im-en { margin-top: 22px; color: var(--gold); letter-spacing: .55em; text-indent: .55em; font-size: 13px; opacity: 0; }
.im-tagline { margin-top: 10px; font: 500 clamp(16px, 2vw, 20px) var(--t-head); letter-spacing: .2em; color: #f6e7c4; opacity: 0; }
.im-cta { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; opacity: 0; }
.im-kicker { animation: im-fade 1s .2s forwards; }
.im-plaque { animation: im-drop 1.3s cubic-bezier(.3, 1.4, .5, 1) .3s forwards; }
.im-en { animation: im-fade 1s 1.1s forwards; }
.im-tagline { animation: im-fade 1s 1.3s forwards; }
.im-cta { animation: im-fade 1s 1.5s forwards; }
@keyframes im-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes im-drop { 0% { opacity: 0; transform: translateY(-140px) rotate(-5deg); } 55% { opacity: 1; transform: translateY(10px) rotate(1.8deg); } 80% { transform: translateY(-4px) rotate(-.6deg); } 100% { opacity: 1; transform: none; } }
.im-scroll { position: absolute; bottom: 26px; left: 50%; margin-left: -50px; width: 100px; z-index: 6; color: var(--gold); font-size: 12px; letter-spacing: .3em; text-indent: .3em; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.im-scroll i { width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); animation: im-drip 2s ease-in-out infinite; transform-origin: top; }
@keyframes im-drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- 區塊共用 ---------- */
.im-sec { position: relative; padding: 110px 0; }
.im-about, .im-history, .im-services, .im-gallery { background: var(--paper); color: var(--ink); }
.im-about::before, .im-history::before, .im-services::before, .im-gallery::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 1px 1px, rgba(140, 90, 30, .12) 1px, transparent 0) 0 0 / 22px 22px; pointer-events: none; }
.im-about::after, .im-services::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 20px; background: var(--fret) repeat-x center / 40px 20px; opacity: .5; }
.im-head { text-align: center; margin-bottom: 56px; position: relative; }
.im-head p { font-size: 12px; letter-spacing: .6em; text-indent: .6em; color: var(--gold-d); font-weight: 700; }
.im-head h2 { font: 900 clamp(28px, 4vw, 42px)/1.4 var(--t-head); letter-spacing: .24em; text-indent: .24em; margin-top: 6px; }
.im-head small { display: block; margin-top: 12px; font-size: 13px; letter-spacing: .15em; opacity: .7; }
.im-head.light { color: #fbefcf; }
.im-head.light p { color: var(--gold); }
.im-head.left { text-align: left; margin-bottom: 24px; }
.im-head.left h2, .im-head.left p { text-indent: 0; }
.im-orn { display: block; width: 220px; height: 14px; margin: 14px auto 0; position: relative; background: linear-gradient(90deg, transparent, #c9963b 25%, #c9963b 75%, transparent) center / 100% 1px no-repeat; }
.im-orn::before { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border: 1.5px solid #c9963b; background: var(--red); transform: translate(-50%, -50%) rotate(45deg); }
.im-orn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 60px; height: 6px; transform: translate(-50%, -50%); border-left: 6px solid #c9963b; border-right: 6px solid #c9963b; }

/* 簡介 */
.im-intro { font: 400 19px/2.2 var(--t-head); text-align: center; letter-spacing: .06em; color: #3c2715; white-space: pre-line; }
.im-medals { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 50px; }
.im-medal { min-width: 200px; padding: 22px 26px; text-align: center; background: #fffaf0; border: 2px solid #c9963b; outline: 1px solid #c9963b; outline-offset: -8px; border-radius: 4px; box-shadow: 0 12px 28px rgba(90, 50, 10, .12); }
.im-medal span { display: block; font-size: 12.5px; letter-spacing: .3em; color: #9a6a2c; }
.im-medal b { display: block; font: 700 19px var(--t-head); color: var(--red-d); margin-top: 4px; letter-spacing: .06em; }

/* 神明翻牌 */
.im-deities { background: radial-gradient(ellipse at 50% 0%, #7a1a14, #3b0b09 55%, #210605); color: #fbefcf; overflow: hidden; }
.im-deities::before { content: ""; position: absolute; inset: 0; background: var(--fret) repeat center / 40px 20px; opacity: .05; }
.im-niches { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; position: relative; }
.im-niche { position: relative; height: 380px; perspective: 1100px; cursor: pointer; outline: none; }
.im-niche .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .9s cubic-bezier(.3, .8, .2, 1); border-radius: 130px 130px 10px 10px; }
.im-niche .front { background: linear-gradient(180deg, #4a0f0b, #1d0605); border: 2px solid var(--gold); box-shadow: inset 0 0 0 7px #2a0807, inset 0 0 0 8px rgba(224, 176, 79, .5), 0 20px 40px rgba(0, 0, 0, .45); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.im-niche .arch { position: relative; display: grid; place-items: center; width: 150px; height: 220px; }
.im-niche .halo { position: absolute; top: 0; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 120, .55), rgba(255, 210, 120, .06) 60%, transparent 70%); animation: im-pulse 4s ease-in-out infinite; }
@keyframes im-pulse { 50% { transform: scale(1.12); opacity: .7; } }
.im-niche b { position: relative; display: flex; flex-direction: column; align-items: center; font: 900 34px/1.22 var(--t-head); color: #ffd98a; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.im-niche .front p { font-size: 13px; letter-spacing: .25em; color: var(--gold); padding: 0 16px; text-align: center; }
.im-niche .back { background: var(--paper); color: var(--ink); transform: rotateY(180deg); padding: 70px 26px 26px; text-align: center; border: 2px solid var(--gold); overflow: auto; }
.im-niche .back h3 { font: 900 24px var(--t-head); letter-spacing: .2em; color: var(--red-d); }
.im-niche .back .t { color: #9a6a2c; font-size: 13px; letter-spacing: .2em; margin: 4px 0 14px; }
.im-niche .back p { font-size: 14.5px; line-height: 1.9; }
.im-niche.flipped .front { transform: rotateY(-180deg); }
.im-niche.flipped .back { transform: rotateY(0); }
.im-niche:hover .front { box-shadow: inset 0 0 0 7px #2a0807, inset 0 0 0 8px rgba(224, 176, 79, .9), 0 0 40px rgba(224, 176, 79, .35); }

/* 沿革時間線 */
.im-timeline { position: relative; max-width: 980px; margin: 0 auto; --p: 0; }
.im-timeline::before, .im-timeline::after { content: ""; position: absolute; left: 50%; top: 0; width: 2px; margin-left: -1px; }
.im-timeline::before { bottom: 0; background: #dccaa1; }
.im-timeline::after { height: calc(var(--p) * 100%); background: linear-gradient(var(--gold), var(--red)); box-shadow: 0 0 10px rgba(224, 176, 79, .8); }
.im-timeline li { position: relative; width: 50%; padding: 0 56px 46px 0; text-align: right; }
.im-timeline li:nth-child(even) { margin-left: 50%; padding: 0 0 46px 56px; text-align: left; }
.im-timeline .dot { position: absolute; top: 14px; right: -10px; width: 20px; height: 20px; background: var(--red); border: 3px solid var(--gold); transform: rotate(45deg); z-index: 1; }
.im-timeline li:nth-child(even) .dot { right: auto; left: -10px; }
.im-timeline .card { background: #fffaf0; border: 1px solid #e3cf9f; border-radius: 6px; padding: 22px 26px; box-shadow: 0 14px 30px rgba(90, 50, 10, .1); }
.im-timeline .year { display: inline-block; font: 700 14px var(--t-head); letter-spacing: .12em; color: #ffe3a3; background: var(--red); padding: 2px 12px; border-radius: 3px; }
.im-timeline h3 { font: 700 20px var(--t-head); letter-spacing: .08em; margin: 8px 0 6px; color: var(--red-d); }
.im-timeline p { font-size: 15px; color: #5a4430; }

/* 線上點燈 */
.im-lamps { background: radial-gradient(ellipse at 30% 50%, rgba(179, 38, 30, .35), transparent 60%), #0f0605; color: var(--t-fg); overflow: hidden; }
.im-lamps-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.im-lamp-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 18px; border: 2px solid rgba(224, 176, 79, .4); border-radius: 10px; background: linear-gradient(#1f0b08, #140706); box-shadow: inset 0 0 40px rgba(0, 0, 0, .6); }
.lamp { aspect-ratio: 3 / 4; border: 1px solid rgba(224, 176, 79, .3); border-radius: 8px; background: #1a0907; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 4px 6px; transition: background .5s; }
.lamp i { width: 24px; height: 30px; border-radius: 50% 50% 46% 46%; background: #3a1a10; transition: background .6s, box-shadow .6s; }
.lamp em { font-style: normal; font-size: 11px; letter-spacing: .1em; color: #ffd98a; background: rgba(179, 38, 30, .75); padding: 0 6px; border-radius: 3px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lamp.on { background: #2b0f09; }
.lamp.on i { background: radial-gradient(circle at 50% 60%, #fff6d0, #ffbf55 45%, #e0602a 80%); box-shadow: 0 0 18px 6px rgba(255, 170, 70, .55); animation: im-flicker 3s ease-in-out infinite; }
.lamp.ignite { animation: im-ignite 1.2s ease-out; }
@keyframes im-flicker { 50% { box-shadow: 0 0 24px 9px rgba(255, 170, 70, .4); } }
@keyframes im-ignite { 0% { transform: scale(1); } 30% { transform: scale(1.3); box-shadow: 0 0 60px 20px rgba(255, 190, 90, .8); } 100% { transform: scale(1); } }
.im-lamp-copy p { color: #e0cfa9; }
.im-lamp-copy b { color: var(--gold); font-size: 20px; }
.im-lamp-form { display: flex; gap: 10px; margin: 26px 0 12px; flex-wrap: wrap; }
.im-lamp-form input, .im-lamp-form select { font: inherit; padding: 12px 16px; border-radius: 999px; border: 1.5px solid rgba(224, 176, 79, .55); background: rgba(255, 255, 255, .04); color: #fbefcf; min-width: 0; }
.im-lamp-form input { flex: 1 1 160px; }
.im-lamp-form select option { color: #222; }
.im-lamp-msg { min-height: 1.8em; color: #ffd98a !important; font-weight: 700; }
.im-note { font-size: 12.5px; opacity: .65; }

/* 宗教服務（吊牌） */
.im-plaques { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; position: relative; }
.im-svc { position: relative; text-align: center; background: #fffaf0; border: 2px solid #b8873a; outline: 1px solid #b8873a; outline-offset: -9px; border-radius: 4px; padding: 40px 26px 30px; margin-top: 26px; box-shadow: 0 16px 34px rgba(90, 50, 10, .12); transition: transform .3s, box-shadow .3s; transform-origin: 50% -26px; }
.im-svc:hover { transform: rotate(-1.5deg); box-shadow: 0 22px 40px rgba(90, 50, 10, .2); }
.im-svc .hook { position: absolute; left: 50%; top: -28px; width: 70px; height: 28px; margin-left: -35px; border: 2px solid #b8873a; border-bottom: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: linear-gradient(transparent 48%, #b8873a 49%, #b8873a 52%, transparent 53%); }
.im-svc .hook::after { content: ""; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--gold); }
.im-svc h3 { font: 900 23px var(--t-head); letter-spacing: .2em; color: var(--red-d); }
.im-svc p { font-size: 14.5px; color: #5a4430; margin: 10px 0 14px; }
.im-svc b { display: inline-block; background: var(--red); color: #ffe3a3; padding: 3px 16px; border-radius: 999px; font-size: 14px; letter-spacing: .08em; }

/* 活動 */
.im-events { background: linear-gradient(180deg, #2a0d0a, #170807); color: var(--t-fg); }
.im-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border: 2px solid rgba(224, 176, 79, .5); border-radius: 10px; overflow: hidden; background: #1f0b08; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); margin-bottom: 28px; }
.im-feature .pic { min-height: 340px; overflow: hidden; }
.im-feature .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s; }
.im-feature:hover .pic img { transform: scale(1.06); }
.im-feature .txt { padding: 38px 40px; }
.im-feature h3 { font: 900 clamp(22px, 2.6vw, 30px)/1.4 var(--t-head); letter-spacing: .08em; margin: 12px 0 10px; color: #fbefcf; }
.im-feature p { color: #d8c49c; font-size: 15px; }
.im-feature .when { font-size: 14px; color: var(--gold); margin: 6px 0 22px; }
.im-count { display: flex; gap: 10px; margin: 22px 0 14px; }
.im-count div { min-width: 64px; text-align: center; padding: 8px 6px; border: 1px solid rgba(224, 176, 79, .45); border-radius: 6px; background: rgba(0, 0, 0, .3); }
.im-count b { display: block; font: 700 28px/1.1 var(--t-head); color: var(--gold); font-variant-numeric: tabular-nums; }
.im-count span { font-size: 11.5px; letter-spacing: .2em; color: #bca98a; }
.im-event-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.im-ev { display: flex; align-items: center; gap: 18px; padding: 16px; border: 1px solid rgba(224, 176, 79, .3); border-radius: 10px; background: rgba(255, 255, 255, .03); transition: background .25s, border-color .25s, transform .25s; }
.im-ev:hover { background: rgba(224, 176, 79, .08); border-color: var(--gold); transform: translateX(4px); }
.im-ev .date { flex: none; width: 74px; height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, #c42c22, #7a1510); border: 1.5px solid var(--gold); border-radius: 6px; }
.im-ev .date b { font: 900 30px/1 var(--t-head); color: #ffe3a3; }
.im-ev .date small { font-size: 11px; color: #ffd98a; letter-spacing: .05em; margin-top: 4px; }
.im-ev .info { flex: 1; display: grid; gap: 3px; }
.im-ev .info .t-chip { justify-self: start; font-size: 11.5px; }
.im-ev .info b { font: 700 17px/1.45 var(--t-head); color: #fbefcf; }
.im-ev .info small { color: #bca98a; font-size: 13px; }
.im-ev .go { color: var(--gold); font-size: 13.5px; letter-spacing: .1em; white-space: nowrap; }
.im-empty { text-align: center; color: #bca98a; }

/* 相簿 */
.im-masonry { columns: 3; column-gap: 18px; position: relative; }
.im-masonry a { position: relative; display: block; break-inside: avoid; margin-bottom: 18px; border: 7px solid #fffaf0; box-shadow: 0 0 0 1px #d8c18e, 0 16px 30px rgba(90, 50, 10, .18); overflow: hidden; }
.im-masonry img { width: 100%; transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .5s; }
.im-masonry a:hover img { transform: scale(1.07); filter: saturate(1.15); }
.im-masonry span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 10px; background: linear-gradient(transparent, rgba(20, 8, 6, .85)); color: #ffe3a3; font: 700 14px var(--t-head); letter-spacing: .15em; transform: translateY(100%); transition: transform .4s; }
.im-masonry a:hover span { transform: none; }

/* 參拜資訊 */
.im-visit { background: #130806; color: var(--t-fg); }
.im-visit-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: start; }
.im-info div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px dashed rgba(224, 176, 79, .35); }
.im-info dt { color: var(--gold); letter-spacing: .2em; font-size: 14px; }
.im-info dd { color: #f3e6c8; }
.im-visit .t-btn { margin-top: 26px; }
.im-map { border: 3px solid var(--gold); outline: 1px solid rgba(224, 176, 79, .5); outline-offset: 6px; border-radius: 4px; overflow: hidden; }
.im-map iframe { display: block; width: 100%; height: 400px; border: 0; filter: sepia(.35) saturate(.9); }

/* 頁尾 */
.im-footer { background: #0b0404; color: #bca98a; text-align: center; }
.im-fret { height: 22px; background: var(--fret) repeat-x center / 40px 20px; opacity: .55; border-top: 1px solid rgba(224, 176, 79, .3); border-bottom: 1px solid rgba(224, 176, 79, .3); }
.im-footer-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 44px 0 26px; text-align: left; flex-wrap: wrap; }
.im-footer-name { font: 900 26px var(--t-head); letter-spacing: .25em; color: var(--gold); }
.im-footer-info { text-align: right; font-size: 14px; }
.im-credit { font-size: 12.5px; padding: 18px 0 30px; border-top: 1px solid rgba(224, 176, 79, .15); width: min(1180px, 100% - 40px); margin: 0 auto; }
.im-credit a { color: var(--gold); }

/* 活動內頁套色 */
.t-imperial .t-event-hero { background: radial-gradient(ellipse at 70% 0%, #6a1b14, #2a0d0a 60%); }
.t-imperial .t-event-hero h1 { color: #fbefcf; }
.t-imperial .t-event-page { background: #170807; }

/* ---------- RWD ---------- */
@media (max-width: 1080px) {
    .im-couplet { display: none; }
    .im-lamps-grid, .im-feature, .im-visit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .im-toggle { display: flex; }
    .im-nav { position: fixed; top: 76px; left: 0; right: 0; flex-direction: column; background: rgba(16, 7, 5, .98); padding: 16px 20px 24px; border-bottom: 2px solid var(--gold); transform: translateY(-130%); opacity: 0; pointer-events: none; transition: .3s; }
    .im-nav.open { transform: none; opacity: 1; pointer-events: auto; }
    .im-nav a { padding: 13px 10px; font-size: 16.5px; }
    .im-dots { display: none; }
    .im-event-list { grid-template-columns: 1fr; }
    .im-masonry { columns: 2; }
    .im-timeline::before, .im-timeline::after { left: 18px; }
    .im-timeline li, .im-timeline li:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 36px 52px; text-align: left; }
    .im-timeline .dot, .im-timeline li:nth-child(even) .dot { left: 8px; right: auto; }
}
@media (max-width: 560px) {
    .im-sec { padding: 76px 0; }
    .im-plaque { padding: 18px 26px 22px; }
    .im-plaque h1 { letter-spacing: .12em; text-indent: .12em; }
    .im-lanterns .l2, .im-lanterns .l3 { display: none; }
    .im-lamp-wall { grid-template-columns: repeat(4, 1fr); }
    .im-lamp-wall .lamp:nth-child(n+17) { display: none; }
    .im-masonry { columns: 1; }
    .im-feature .txt { padding: 26px 22px; }
    .im-brand small { display: none; }
    .im-footer-in, .im-footer-info { text-align: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .im-couplet { transform: none; }
    .im-plaque, .im-kicker, .im-en, .im-tagline, .im-cta { opacity: 1; }
    .im-halo::before, .im-halo::after, .im-niche .halo, .lamp.on i { animation: none; }
}
