/* =========================================================
   digi07.html「AR 擴增實境基礎與企劃／AR 互動濾鏡與物件開發」專用樣式
   版型共用 digi05.css（.d5-page 關卡式講義），本檔只做：
   1) 單元主色改為青綠（AR／科技感）
   2) AR 相關互動元件：手機掃描模擬、AR 類型選擇、觸發圖特徵點、平台時間軸
   ========================================================= */
.d5-page.d7 {
	--d-brand: #0E9F9A;
	--d-brand-strong: #0A6F6B;
	--d-brand-soft: #DDF4F2;
	--d-brand-grad: linear-gradient(135deg, #22C1B6 0%, #0A6F6B 100%);
	--d-glass: linear-gradient(165deg, rgba(255,255,255,.84) 0%, rgba(221,244,242,.55) 100%);
	--d-bg: #F4F8F8;
	--d-dot: #D7E7E6;
	--d-line: #DCE9E8;
	--scan: #3EF2E0;
	background-color: var(--d-bg);
}
.d7 .d5-subnav { background: rgba(244,248,248,.94); }
.d7 .d5-intro::before { background: var(--d-brand); }
.d7 .prompt-box .ph { color: #8EEDE4; }
.d7 .prompt-wrap .ptitle i { color: #8EEDE4; }
.d7 .case-chip { margin-top: 14px; }
.d7 .case-chip .mark { font-size: 17px; letter-spacing: -.04em; background: #000; color: #fff; }

/* ---------- 開場：手機掃描模擬 ---------- */
.ar-scene { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; padding: 10px 0 0; }
.ar-poster { width: 54%; aspect-ratio: 1414 / 2000; border-radius: 6px; overflow: hidden; box-shadow: 0 24px 40px -26px rgba(0,0,0,.6); transform: rotate(-4deg) translateX(14%); }
.ar-poster img { width: 100%; height: 100%; object-fit: cover; }
.ar-phone { position: relative; z-index: 2; width: 46%; aspect-ratio: 9 / 19; border-radius: 26px; background: #111; padding: 8px; box-shadow: 0 30px 50px -26px rgba(0,0,0,.7); transform: translateX(-8%); }
.ar-phone .scr { position: relative; width: 100%; height: 100%; border-radius: 19px; overflow: hidden; background: #222; }
.ar-phone .cam { position: absolute; inset: 0; background: url("../img/digi/digi06-dugu-poster.webp") center 62% / 165% auto no-repeat; filter: brightness(.82); }
.ar-phone .reticle { position: absolute; left: 12%; right: 12%; top: 22%; bottom: 30%; border: 2px solid var(--scan); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.18); }
.ar-phone .scanline { position: absolute; left: 12%; right: 12%; top: 22%; height: 2px; background: var(--scan); box-shadow: 0 0 12px var(--scan); animation: arScan 2.4s ease-in-out infinite; }
.ar-phone .model { position: absolute; left: 50%; bottom: 31%; width: 52%; transform: translateX(-50%); animation: arPop 4.8s var(--d-ease) infinite; transform-origin: 50% 100%; }
.ar-phone .model svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 10px rgba(0,0,0,.45)); }
.ar-phone .tag { position: absolute; left: 8%; right: 8%; top: 9%; background: rgba(255,255,255,.95); border-radius: 10px; padding: 6px 8px; font-size: 10px; line-height: 1.45; color: #222; animation: arTag 4.8s var(--d-ease) infinite; }
.ar-phone .tag b { display: block; color: #C92A2A; font-size: 11px; }
.ar-phone .ui { position: absolute; left: 0; right: 0; bottom: 6%; display: flex; justify-content: center; gap: 8px; animation: arTag 4.8s var(--d-ease) infinite; }
.ar-phone .ui span { font-size: 9px; font-weight: 800; background: var(--d-brand); color: #fff; border-radius: 99px; padding: 4px 9px; }
.ar-phone .ui span.o { background: rgba(255,255,255,.9); color: #222; }
@keyframes arScan { 0%,100% { top: 22%; } 50% { top: 69%; } }
@keyframes arPop { 0%,30% { opacity: 0; transform: translateX(-50%) scale(.2) translateY(30px); } 42% { opacity: 1; transform: translateX(-50%) scale(1.06); } 48%,92% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); } 70% { transform: translateX(-50%) scale(1) rotate(3deg); } 100% { opacity: 0; transform: translateX(-50%) scale(1); } }
@keyframes arTag { 0%,44% { opacity: 0; transform: translateY(8px); } 52%,92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.ar-caption { font-size: 12.5px !important; color: var(--d-ink-3) !important; text-align: center; margin: 12px 0 0 !important; }

/* ---------- AR 類型選擇器 ---------- */
.type-picker { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 14px; }
.type-picker button { appearance: none; border: 1px solid var(--d-line); background: #fff; border-radius: 12px; padding: 10px 8px; cursor: pointer; text-align: center; transition: all .2s; }
.type-picker button i { display: block; font-size: 22px; color: var(--d-brand-strong); }
.type-picker button b { display: block; font-size: 13px; color: var(--d-ink); margin-top: 4px; }
.type-picker button small { display: block; font: 600 10.5px var(--d-font-mono); color: var(--d-ink-3); }
.type-picker button[aria-pressed="true"] { background: var(--d-ink); border-color: var(--d-ink); }
.type-picker button[aria-pressed="true"] i, .type-picker button[aria-pressed="true"] b { color: #fff; }
.type-picker button[aria-pressed="true"] small { color: #B9C7C6; }
.type-view { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; background: #fff; border: 1px solid var(--d-line); border-radius: 14px; padding: 16px; }
.type-phone { position: relative; width: 150px; aspect-ratio: 9 / 16; border-radius: 18px; background: #111; padding: 6px; }
.type-phone .tp { position: relative; width: 100%; height: 100%; border-radius: 13px; overflow: hidden; background: linear-gradient(180deg,#5d6b6a,#2c3434); }
.type-phone .tp > * { position: absolute; transition: opacity .4s; }
.tp .t-card { left: 18%; right: 18%; top: 40%; height: 34%; background: #fff url("../img/digi/digi06-dugu-poster.webp") center/cover; border-radius: 3px; transform: perspective(200px) rotateX(38deg); }
.tp .t-floor { left: 0; right: 0; bottom: 0; height: 42%; background: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 22px), repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 1px, transparent 1px 22px), #7a6a58; transform: perspective(160px) rotateX(55deg); transform-origin: bottom; }
.tp .t-face { left: 26%; right: 26%; top: 24%; height: 42%; border-radius: 50% 50% 46% 46%; background: #E8C4A6; }
.tp .t-face::before, .tp .t-face::after { content: ""; position: absolute; top: 42%; width: 9px; height: 9px; border-radius: 50%; background: #333; }
.tp .t-face::before { left: 26%; } .tp .t-face::after { right: 26%; }
.tp .t-hat { left: 22%; right: 22%; top: 6%; }
.tp .t-hat svg { width: 100%; display: block; }
.tp .t-map { inset: 0; background: linear-gradient(180deg, #9FD3E6 0 46%, #6E9C5B 46%); }
.tp .t-pin { left: 50%; top: 30%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--d-brand); box-shadow: 0 6px 12px rgba(0,0,0,.35); }
.tp .t-shroom { left: 50%; width: 48%; margin-left: -24%; bottom: 30%; animation: tpFloat 2.4s ease-in-out infinite alternate; }
.tp .t-shroom svg { width: 100%; display: block; }
@keyframes tpFloat { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.tp .t-label { left: 8%; right: 8%; top: 8%; background: rgba(255,255,255,.92); border-radius: 7px; padding: 4px 6px; font-size: 9.5px; line-height: 1.35; color: #222; font-weight: 700; }
.type-info h5 { margin: 0; font-size: 18px; font-weight: 900; }
.type-info h5 small { font: 600 12px var(--d-font-mono); color: var(--d-ink-3); margin-left: 6px; }
.type-info p { font-size: 14px; margin: 6px 0 0; }
.type-info dl { margin: 10px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 13.5px; }
.type-info dt { font-weight: 800; color: var(--d-ink); white-space: nowrap; }
.type-info dd { margin: 0; color: var(--d-ink-2); }
.type-info .fit { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 800; border-radius: 99px; padding: 3px 10px; }
.type-info .fit.hi { background: var(--d-brand-soft); color: var(--d-brand-strong); }
.type-info .fit.mid { background: #FFF3D6; color: #8A6100; }
.type-info .fit.lo { background: #F3EFE8; color: var(--d-ink-2); }

/* ---------- 體驗旅程 ---------- */
.journey { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; }
.journey > div { position: relative; background: #fff; border: 1px solid var(--d-line); border-radius: 12px; padding: 10px 9px; text-align: center; }
.journey > div:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); z-index: 2; color: var(--d-brand); font-weight: 900; font-size: 13px; }
.journey i { font-size: 20px; color: var(--d-brand-strong); }
.journey b { display: block; font-size: 13px; color: var(--d-ink); margin-top: 2px; }
.journey span { display: block; font-size: 11.5px; color: var(--d-ink-3); line-height: 1.45; margin-top: 2px; }

/* ---------- 平台時間軸 ---------- */
.plat-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.plat-timeline::before { content: ""; position: absolute; left: 92px; top: 6px; bottom: 6px; width: 2px; background: var(--d-line); }
.plat-timeline li { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 26px; padding: 6px 0; font-size: 14px; color: var(--d-ink-2); }
.plat-timeline li .d { font: 800 12.5px var(--d-font-mono); color: var(--d-ink); text-align: right; padding-top: 1px; }
.plat-timeline li::before { content: ""; position: absolute; left: 87px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--d-ink-3); }
.plat-timeline li.dead::before { border-color: var(--d-warn); }
.plat-timeline li.ok::before { border-color: var(--d-good); background: var(--d-good); }
.plat-timeline li b { color: var(--d-ink); }
.plat-timeline li.dead b { color: var(--d-warn); text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* ---------- 觸發圖特徵點 ---------- */
.target-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.target-card { background: #fff; border: 1px solid var(--d-line); border-radius: 14px; padding: 10px; }
.target-card .tc-img { position: relative; aspect-ratio: 1414 / 2000; border-radius: 8px; overflow: hidden; }
.target-card .tc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.target-card .tc-img.grad { background: linear-gradient(160deg, #F7C6D9, #B8D8F5); }
.target-card .tc-img.grad::after { content: "SPRING"; position: absolute; left: 0; right: 0; top: 44%; text-align: center; font: 300 15px/1 var(--d-font-display); letter-spacing: .4em; color: rgba(255,255,255,.95); }
.target-card .tc-img.rep { background: radial-gradient(circle, #222 22%, transparent 24%) 0 0 / 22px 22px, #fff; }
.target-card .fp { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border: 1.5px solid #FFE600; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.55); opacity: 0; transform: scale(.3); transition: opacity .3s, transform .3s; }
.target-grid.show .fp { opacity: 1; transform: none; }
.target-card b { display: block; font-size: 14px; color: var(--d-ink); margin-top: 8px; }
.target-card .stars { font-size: 13px; letter-spacing: 2px; color: #E0A800; }
.target-card .stars.lo { color: var(--d-ink-3); }
.target-card p { font-size: 12.5px !important; margin: 4px 0 0 !important; line-height: 1.6 !important; }
.fp-toggle { margin-top: 12px; appearance: none; border: 0; background: var(--d-ink); color: #fff; border-radius: 9px; padding: 7px 14px; font-size: 13px; font-weight: 800; cursor: pointer; }

@media (max-width: 991px) {
	.journey { grid-template-columns: repeat(3, minmax(0,1fr)); row-gap: 10px; }
	.journey > div:nth-child(3)::after { display: none; }
}
@media (max-width: 640px) {
	.type-picker { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.type-view { grid-template-columns: 1fr; justify-items: center; }
	.type-info { justify-self: stretch; }
	.target-grid { grid-template-columns: 1fr 1fr; }
	.journey { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.journey > div::after { display: none; }
	.plat-timeline::before { left: 72px; }
	.plat-timeline li { grid-template-columns: 60px 1fr; }
	.plat-timeline li::before { left: 67px; }
}
@media (prefers-reduced-motion: reduce) {
	.ar-phone *, .tp * { animation: none !important; }
	.ar-phone .model, .ar-phone .tag, .ar-phone .ui { opacity: 1; }
}

/* ---------- 10 IG 的 AR：導流循環＋手機示意 ---------- */
.ig-overview { background: #fff; border: 1px solid var(--d-line); border-radius: 14px; padding: 14px; }
.ig-flow { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.ig-flow > div { position: relative; text-align: center; border-radius: 12px; padding: 10px 8px; background: linear-gradient(160deg, #FDF2F8, #F3F0FF); }
.ig-flow > div:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: #C13584; font-weight: 900; z-index: 2; }
.ig-flow i { font-size: 22px; color: #C13584; }
.ig-flow b { display: block; font-size: 13.5px; color: var(--d-ink); margin-top: 2px; }
.ig-flow span { display: block; font-size: 11.5px; color: var(--d-ink-3); }
.ig-flow-note { font-size: 13px !important; margin: 10px 0 0 !important; text-align: center; color: var(--d-ink-2) !important; }
.ig-split { display: grid; grid-template-columns: 1fr 200px; gap: 22px; align-items: start; }
.ig-phone { width: 200px; aspect-ratio: 9 / 19; border-radius: 28px; background: #111; padding: 8px; box-shadow: 0 24px 40px -24px rgba(0,0,0,.6); position: sticky; top: calc(var(--hdr) + 80px); }
.ig-phone .scr { position: relative; width: 100%; height: 100%; border-radius: 21px; overflow: hidden; background: #2b2b2b; }
.ig-phone .scr.filter { background: linear-gradient(180deg, #4a4f55, #24272b); }
.ig-phone .face { position: absolute; left: 24%; right: 24%; top: 34%; height: 34%; border-radius: 50% 50% 46% 46%; background: #E2BC9C; }
.ig-phone .face::before, .ig-phone .face::after { content: ""; position: absolute; top: 44%; width: 10px; height: 10px; border-radius: 50%; background: #2a2a2a; }
.ig-phone .face::before { left: 25%; } .ig-phone .face::after { right: 25%; }
.ig-phone .hat { position: absolute; left: 14%; right: 14%; top: 21%; animation: tpFloat 2.6s ease-in-out infinite alternate; }
.ig-phone .hat svg { width: 100%; display: block; filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
.ig-phone .result { position: absolute; left: 10%; right: 10%; top: 6%; background: #fff; border-radius: 12px; padding: 7px 9px; text-align: center; }
.ig-phone .result small { display: block; font-size: 9px; color: #777; }
.ig-phone .result b { display: block; font: 900 16px/1.2 var(--d-font-display); color: #C92A2A; }
.ig-phone .result span { display: block; font-size: 9px; color: #444; line-height: 1.4; }
.ig-phone .mark { position: absolute; right: 8%; bottom: 17%; font-size: 8.5px; font-weight: 800; color: #fff; background: rgba(0,0,0,.55); border-radius: 6px; padding: 2px 6px; }
.ig-phone .shutter { position: absolute; left: 50%; bottom: 4%; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center; }
.ig-phone .shutter i { width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.ig-phone.story .scr { background: #000 url("../img/digi/digi06-dugu-poster.webp") center / cover; }
.ig-phone.story .bar { position: absolute; left: 6%; right: 6%; top: 3%; display: flex; gap: 3px; }
.ig-phone.story .bar i { flex: 1; height: 2px; background: rgba(255,255,255,.5); border-radius: 2px; }
.ig-phone.story .bar i:first-child { background: #fff; }
.ig-phone.story .who { position: absolute; left: 6%; top: 6%; display: flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ig-phone.story .who span { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #E1306C; }
.ig-phone.story .link-sticker { position: absolute; left: 50%; top: 66%; transform: translateX(-50%) rotate(-3deg); white-space: nowrap; background: #fff; color: #3B82F6; font-size: 11px; font-weight: 800; border-radius: 9px; padding: 6px 10px; box-shadow: 0 6px 14px rgba(0,0,0,.35); animation: igPulse 2s ease-in-out infinite; }
.ig-phone.story .reply { position: absolute; left: 6%; right: 6%; bottom: 3%; font-size: 9px; color: #fff; border: 1px solid rgba(255,255,255,.7); border-radius: 99px; padding: 5px 10px; }
@keyframes igPulse { 0%,100% { transform: translateX(-50%) rotate(-3deg) scale(1); } 50% { transform: translateX(-50%) rotate(-3deg) scale(1.06); } }
@media (max-width: 991px) {
	.ig-split { grid-template-columns: 1fr; justify-items: center; }
	.ig-split > div:first-child { justify-self: stretch; }
	.ig-phone { position: static; }
}
@media (max-width: 640px) {
	.ig-flow { grid-template-columns: 1fr 1fr; }
	.ig-flow > div:nth-child(2)::after { display: none; }
}
