/* 상단 바 왼쪽 작은 로고 링(묵운 IP-19 → 스타터 S3-35) — 로고 뒤 층 · transform·opacity·stroke 만 · 로고 글자는 정지 상태에서 transform·filter 0
   색: --sigil(앱 대표색) · 앱 설정 움직임 끔·최소 = 완성 그림만(결정 D9) · 연출 지도 docs/motion-map.md 「상단 바 로고 링」 */
.brand { position: relative; }
.brand .brand-logo, .brand .brand-word { position: relative; z-index: 1; }
.brand-sigil { position: absolute; left: -6px; top: 50%; z-index: 0; width: 40px; height: 40px; margin-top: -20px; pointer-events: none; overflow: visible; }
.brand-sigil circle, .brand-sigil line { fill: none; stroke: var(--sigil, var(--accent-2, #d4b475)); stroke-width: 1.2; stroke-linecap: round; }
.brand-sigil .bs-outer { stroke-opacity: .55; } .brand-sigil .bs-inner { stroke-width: .9; stroke-opacity: .4; }
.brand-sigil .bs-ticks line { stroke-width: 1; stroke-opacity: .45; }
.brand-sigil .bs-mo { fill: var(--sigil, var(--accent-2, #d4b475)); fill-opacity: .55; font-family: "Noto Serif KR", serif; font-size: 9px; }
/* ② 머묾: 60초 한 바퀴 · 숨으면 멈춤 */
.brand-sigil .bs-ring { transform-origin: 20px 20px; animation: bs-spin 60s linear infinite; }
.brand.bs-paused .brand-sigil .bs-ring { animation-play-state: paused; }
/* ② 6–10초마다 링을 훑는 빛(짧은 호가 한 바퀴) */
.brand-sigil .bs-sweep { transform-origin: 20px 20px; opacity: 0; }
.brand-sigil .bs-sweep circle { stroke-width: 1.6; stroke-dasharray: 14 86; stroke: var(--sigil-glow, #fff3d6); }
.brand.bs-sweeping .brand-sigil .bs-sweep { animation: bs-sweep 1.2s cubic-bezier(.4, 0, .2, 1) both; }
/* ③ 일하는 중: 6초 한 바퀴 + 눈금 차례로 → 끝나면 한 번 반짝 */
.brand.bs-busy .brand-sigil .bs-ring { animation-duration: 6s; }
.brand.bs-busy .brand-sigil .bs-ticks line { animation: bs-tick 1.2s linear infinite; animation-delay: calc(var(--k) * .1s); }
.brand.bs-done .brand-sigil { animation: bs-done .6s ease-out; }
/* ① 이번 방문 첫 화면: 그려짐 → 가운데 글자 반짝 */
.brand-in .brand-sigil .bs-outer { stroke-dasharray: 100; animation: bs-draw .5s ease-out both; }
.brand-in .brand-sigil .bs-inner { stroke-dasharray: 100; animation: bs-draw .4s .5s ease-out both; }
.brand-in .brand-sigil .bs-ticks { animation: bs-fade .3s .6s both; }
.brand-in .brand-sigil .bs-mo { animation: bs-glint .5s 1.2s both; }
/* ④ 탭: 스프링 눌림(누르는 동안만) + 링 반 바퀴 — 로고 글자는 건드리지 않음 */
.brand:active { transform: scale(.96); transition: transform .12s; }
.brand.bs-tap .brand-sigil { animation: bs-half .4s cubic-bezier(.3, .7, .3, 1); }
/* 광택: 로고 모양(mask)으로만 지나가는 띠 — 로고와 형제 층 */
.brand-shine { position: absolute; z-index: 2; pointer-events: none; overflow: hidden; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.brand-shine::before { content: ""; position: absolute; inset: 0 auto 0 -60%; width: 50%; background: linear-gradient(100deg, transparent, rgba(255, 236, 190, .55), transparent); opacity: 0; }
.brand-shine.is-on::before { animation: bs-shine 1.1s ease-in-out; }
@keyframes bs-spin { to { transform: rotate(360deg); } }
@keyframes bs-sweep { 0% { opacity: 0; transform: rotate(-90deg); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: rotate(270deg); } }
@keyframes bs-tick { 0%, 100% { stroke-opacity: .45; } 10% { stroke-opacity: 1; } }
@keyframes bs-done { 50% { opacity: .6; transform: scale(1.08); } }
@keyframes bs-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes bs-fade { from { opacity: 0; } }
@keyframes bs-glint { 0% { fill-opacity: 0; } 50% { fill-opacity: 1; } 100% { fill-opacity: .55; } }
@keyframes bs-half { from { transform: rotate(0); } to { transform: rotate(180deg); } }
@keyframes bs-shine { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(320%); } }
/* 앱 설정 움직임 끔·최소: 완성 그림만 */
:root[data-motion="off"] .brand-sigil, :root[data-motion="off"] .brand-sigil *, :root[data-motion="off"] .brand-shine::before, :root[data-motion="off"] .brand:active { animation: none !important; transform: none !important; }
:root[data-motion="min"] .brand-sigil, :root[data-motion="min"] .brand-sigil *, :root[data-motion="min"] .brand-shine::before { animation: none !important; }

/* Dalli(TM-2): 낙관 24px 가운데에 링 중심 · 링 색 = 낙관 붉은색 */
/* TB2-1(영재 스샷 11-18 「빨간 원이 낙관 밖으로 번짐·잘림」) → 묵운처럼 링 전체 반투명 .5 · 색 = 대표색(낙관 붉은색과 겹쳐 번져 보이지 않게) · 36px(바 52 안에 위아래 8px 여유) */
.mark.brand { --sigil: var(--brand); --sigil-glow: var(--brand); }
.mark .brand-sigil { left: -6px; width: 36px; height: 36px; margin-top: -18px; opacity: .5; }
