/* 홈 = 선명 스타일 (시안 1) + 움직임 (1 차례로 피어나기 · 2 빛 훑기 + 빛 테두리 · 5 손끝 반응)
   이번주 요약 띠는 그대로 둔다. 칸 · 순서 · 기능은 그대로, 색과 움직임만 더한다.
   색은 카드마다 --c (한눈에 칸은 점 색, 큰 카드는 data-tg-accent), 할 일 줄은 --tc. home-vivid.js 가 넣는다. */
:root[data-design] .dash .kpi { position:relative; overflow:hidden;
  background:radial-gradient(130% 90% at 0 0, color-mix(in srgb, var(--c, var(--accent)) 22%, transparent), transparent 62%), var(--surface-3) !important;
  border-color:color-mix(in srgb, var(--c, var(--accent)) 35%, var(--line)) !important; }
.dash .kpi::before { content:''; position:absolute; left:0; right:0; top:0; height:3px; background:var(--c, var(--accent)); transform-origin:left; }
.dash .kpi .k .dot { width:10px; height:10px; border-radius:50%; box-shadow:0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 25%, transparent); }
.dash .kpi .v { color:var(--c, var(--ink)); font-size:1.95rem; }
:root[data-design] .dash .bi > .card { position:relative; overflow:hidden;
  background:radial-gradient(120% 70% at 0 0, color-mix(in srgb, var(--c, var(--accent)) 14%, transparent), transparent 55%), var(--surface) !important; }
.dash .bi > .card > .card-h .t { display:flex; align-items:center; }
.dash .bi > .card > .card-h .t > svg { width:30px; height:30px; padding:6px; border-radius:50%; box-sizing:border-box; margin-right:8px; flex:none;
  background:color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); color:var(--c, var(--accent)); }
:root[data-design] .dash .tile { position:relative; overflow:hidden; }
.dash .tile::before { content:''; position:absolute; left:0; right:0; top:0; height:3px; background:var(--x, var(--accent)); transform-origin:left; }

/* 할 일: 줄마다 색 띠, 숫자는 색 알약, 급한 줄(확인 필요 · 일보 미작성)은 빛 테두리 */
.todo .ti { position:relative; overflow:hidden; --tc:var(--accent); border-left:4px solid var(--tc) !important;
  background:linear-gradient(90deg, color-mix(in srgb, var(--tc) 12%, transparent), transparent 60%), var(--surface-2) !important; }
.todo .ti.info { --tc:var(--t-blue); } .todo .ti[data-x="due"] { --tc:var(--t-amber); }
.todo .ti.bad { --tc:var(--t-red); } .todo .ti.warn { --tc:var(--t-orange); } .todo .ti.ok { --tc:var(--accent); }
.todo .ti .ic { background:color-mix(in srgb, var(--tc) 22%, transparent) !important; border-radius:50% !important; }
.todo .ti .ic svg { color:var(--tc) !important; stroke:var(--tc) !important; }
.todo .ti .n { min-width:34px; height:30px; padding:0 10px; border-radius:999px; background:var(--tc); color:var(--bg) !important;
  display:inline-flex; align-items:center; justify-content:center; font-weight:900; }
.todo .ti.ok .n { background:transparent; color:var(--tc) !important; }
/* 색 알약 위 숫자 글자는 늘 --bg 로 (대비) */
:root[data-design][data-theme] .todo .ti:not(.ok) .n[data-tg-value] { color:var(--bg) !important; }
.todo .ti.bad, .todo .ti.warn { box-shadow:0 0 0 1px var(--tc), 0 0 14px color-mix(in srgb, var(--tc) 32%, transparent); }

/* ── 움직임 2: 급한 줄만 테두리를 따라 빛이 돈다 (계속 움직이는 것은 이것뿐) ── */
@property --hv-ang { syntax:'<angle>'; inherits:false; initial-value:0deg; }
@keyframes hvSpin { to { --hv-ang:360deg; } }
@keyframes hvBeat { 0%,100% { transform:scale(1); } 12% { transform:scale(1.18); } 24% { transform:scale(1); } 36% { transform:scale(1.12); } }
.todo .ti.bad::before, .todo .ti.warn::before { content:''; position:absolute; inset:0; border-radius:inherit; padding:2px; pointer-events:none;
  background:conic-gradient(from var(--hv-ang), transparent 0 62%, var(--tc) 80%, var(--ink) 86%, var(--tc) 92%, transparent);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude;
  animation:hvSpin 2.4s linear infinite; }
.todo .ti.warn::before { animation-duration:3.2s; }
.todo .ti.bad .n, .todo .ti.warn .n { animation:hvBeat 1.6s ease-in-out infinite; }

/* ── 분만사 지금 (둘째 손보기, 시안 2): 머리 동그란 아이콘 · 세 칸 위 색 띠 · 번짐 · 큰 숫자, 간격 확인이 있으면 그 칸만 빛,
   급한 줄(60분 넘음)만 테두리를 따라 빛이 돌고 "마지막 N분 전" 알약이 뛴다. ── */
.fh .h .fh-ic { width:30px; height:30px; border-radius:50%; flex:none; display:inline-flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, var(--t-pink) 22%, transparent); color:var(--t-pink); }
.fh .h .fh-ic svg { width:17px; height:17px; }
.fh .strip span { position:relative; overflow:hidden; --sc:var(--ink-dim); }
.fh .strip .run { --sc:var(--t-pink); } .fh .strip .rv.warn { --sc:var(--t-orange); } .fh .strip .rv.danger { --sc:var(--t-red); } .fh .strip .done { --sc:var(--accent); }
.fh .strip b { font-size:2rem; color:var(--sc) !important; }
:root[data-theme] .fh .strip span { padding-top:13px;
  background:radial-gradient(130% 90% at 0 0, color-mix(in srgb, var(--sc) 20%, transparent), transparent 62%), var(--surface-3) !important;
  border-color:color-mix(in srgb, var(--sc) 40%, var(--line)) !important; }
:root[data-theme] .fh .strip span::before { content:''; position:absolute; left:0; right:0; top:0; height:3px; background:var(--sc); }
:root[data-theme] .fh .strip .rv.danger, :root[data-theme] .fh .strip .rv.warn { box-shadow:0 0 0 1px var(--sc), 0 0 14px color-mix(in srgb, var(--sc) 32%, transparent); }
.fh .u { position:relative; overflow:hidden; }
:root[data-theme] .fh .u { background:linear-gradient(90deg, color-mix(in srgb, var(--uc, var(--t-pink)) 14%, transparent), transparent 60%), var(--bg); }
.fh .u .ago { padding:3px 10px; border-radius:999px; background:var(--uc, var(--t-pink)); color:var(--bg) !important; font-weight:900; }
.fh .u.ok .ago { background:transparent; color:var(--ink-soft) !important; border:1px solid var(--line-2); }
:root[data-theme] .fh .u.danger { box-shadow:inset 4px 0 0 var(--uc), 0 0 0 1px var(--uc), 0 0 14px color-mix(in srgb, var(--uc) 32%, transparent); }
:root[data-theme] .fh .u.danger::before { content:''; position:absolute; inset:0; border-radius:inherit; padding:2px; pointer-events:none;
  background:conic-gradient(from var(--hv-ang), transparent 0 62%, var(--uc) 80%, var(--ink) 86%, var(--uc) 92%, transparent);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude;
  animation:hvSpin 2.4s linear infinite; }
.fh .u.danger .ago { animation:hvBeat 1.6s ease-in-out infinite; }

/* ── 움직임 1 + 2: 열 때 한 번. home-vivid.js 가 처음 그린 카드에만 .hv-a 를 단다 (다시 받은 숫자는 그대로) ── */
@keyframes hvUp { from { opacity:0; transform:translateY(18px) scale(.98); } to { opacity:1; transform:none; } }
@keyframes hvLine { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@keyframes hvPop { 0% { transform:scale(0); } 60% { transform:scale(1.5); } 100% { transform:scale(1); } }
@keyframes hvDigit { from { transform:translateY(105%); } to { transform:none; } }
@keyframes hvGrowX { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@keyframes hvGrowY { from { transform:scaleY(0); } to { transform:scaleY(1); } }
@keyframes hvSlide { from { opacity:0; transform:translateX(26px); } to { opacity:1; transform:none; } }
@keyframes hvShine { from { transform:translateX(-130%) skewX(-18deg); } to { transform:translateX(260%) skewX(-18deg); } }
.hv-wait { opacity:0; }
.kpi.hv-a, .bi > .card.hv-a { animation:hvUp .55s cubic-bezier(.2,.8,.2,1) both; animation-delay:var(--hv-d, 0s); }
.kpi.hv-a::before, .card.hv-a .tile::before { animation:hvLine .6s cubic-bezier(.6,0,.2,1) both; animation-delay:calc(var(--hv-d, 0s) + .25s); }
.kpi.hv-a .dot { animation:hvPop .45s both; animation-delay:calc(var(--hv-d, 0s) + .35s); }
/* 숫자 줄 높이는 그대로 (예전 line-height 1.05 · bottom 은 움직임이 끝나며 칸이 1.5px 줄어드는 흔들림이 있었다) */
.hv-dgw { display:inline-block; overflow:hidden; vertical-align:top; line-height:inherit; }
.hv-dg { display:inline-block; animation:hvDigit .5s cubic-bezier(.2,.9,.25,1.15) both; }
.kpi.hv-a .gl-bar i { transform-origin:left; animation:hvGrowX .55s cubic-bezier(.3,.8,.3,1) both; }
.kpi.hv-a .gl-rooms i { transform-origin:bottom; animation:hvGrowY .6s cubic-bezier(.3,.8,.3,1.2) both; }
.card.hv-a .tile svg rect { transform-box:fill-box; transform-origin:bottom; animation:hvGrowY .6s cubic-bezier(.3,.9,.3,1.15) both; }
.card.hv-a .todo .ti { animation:hvSlide .45s cubic-bezier(.2,.8,.2,1) both; }
.card.hv-a .todo .ti .n { animation:hvPop .4s both; }
.card.hv-a .todo .ti.bad .n, .card.hv-a .todo .ti.warn .n { animation:hvPop .4s both, hvBeat 1.6s ease-in-out .6s infinite; }
/* 빛 조각(::after)은 빛이 지나가는 동안 · 기울일 때만 만든다 (평소에는 없음) */
.kpi::after, .bi > .card::after { position:absolute; pointer-events:none; opacity:0; }
.kpi.hv-a::after, .bi > .card.hv-a::after { content:''; top:0; bottom:0; left:0; width:45%; opacity:1; transform:translateX(-130%) skewX(-18deg);
  background:linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 18%, transparent), transparent);
  animation:hvShine 1.1s cubic-bezier(.4,0,.2,1) both; animation-delay:calc(var(--hv-d, 0s) + .45s); }

/* ── 움직임 5: 손끝 반응. 마우스면 카드가 그쪽으로 살짝 기울고 빛이 따라온다, 누르면 눌리며 물결 ── */
.dash .kpi, .todo .ti { transition:transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.dash .kpi.hv-tilt, .todo .ti.hv-tilt { transform:perspective(700px) rotateX(var(--hv-rx, 0deg)) rotateY(var(--hv-ry, 0deg)) scale(1.03); }
.dash .kpi.hv-tilt { box-shadow:0 18px 34px var(--scrim-40); }
.todo .ti::after { position:absolute; pointer-events:none; opacity:0; }
.kpi.hv-tilt::after, .todo .ti.hv-tilt::after { content:''; inset:0; width:auto; opacity:1; transform:none; animation:none; border-radius:inherit;
  background:radial-gradient(180px circle at var(--hv-mx, 50%) var(--hv-my, 50%), color-mix(in srgb, var(--ink) 16%, transparent), transparent 60%); }
.dash .kpi.hv-press, .todo .ti.hv-press { transform:scale(.96); }
@keyframes hvInk { from { transform:scale(0); opacity:.5; } to { transform:scale(1); opacity:0; } }
.hv-ink { position:absolute; border-radius:50%; pointer-events:none; background:color-mix(in srgb, var(--c, var(--tc, var(--accent))) 45%, transparent); animation:hvInk .6s ease-out forwards; }

/* 화면 구성(편집) 중에는 움직이지 않는다 */
body.dash-edit .dash .kpi, body.dash-edit .todo .ti { transform:none !important; }

@media (prefers-reduced-motion: reduce) {
  .hv-wait { opacity:1; }
  .kpi.hv-a, .bi > .card.hv-a, .kpi.hv-a *, .card.hv-a *, .kpi.hv-a::before, .kpi.hv-a::after, .bi > .card.hv-a::after, .card.hv-a .tile::before, .hv-dg,
  .todo .ti.bad::before, .todo .ti.warn::before, .todo .ti .n { animation:none !important; }
  .fh .u.danger::before { display:none; } .fh .u.danger .ago { animation:none !important; }
  .todo .ti.bad::before, .todo .ti.warn::before { display:none; }   /* 멈춘 빛 조각만 남지 않게. 빛 테두리(그림자)는 그대로 */
  .kpi.hv-a::after, .bi > .card.hv-a::after { opacity:0; }
  .dash .kpi.hv-tilt, .todo .ti.hv-tilt, .dash .kpi.hv-press, .todo .ti.hv-press { transform:none; }
  .hv-ink { display:none; }
}
@media print {
  .todo .ti.bad::before, .todo .ti.warn::before, .fh .u.danger::before { display:none; }
  .kpi, .card, .kpi *, .card * { animation:none !important; }
}
