/* 남는돈 메뉴 쪽 영상 카드 · 641 (nd-vidcard.js 와 짝)
   선택자 앞 :is(#ndvx,.ndvh) 는 아이디 무게(1,1,0)를 주려는 것 — 업종별 현황은 #app 안을 「all: revert」(1,0,0)로 되돌리므로 그보다 무겁게 */
.ndvh:is(#ndvx, .ndvh) {
  display: block;
  margin: 0 0 16px;
}
.ndvh:is(#ndvx, .ndvh)[data-off] {
  display: none;
}
:is(#ndvx, .ndvh) .ndvc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 8px 14px 8px 8px;
  border: 1px solid #e7dfd7;
  border-radius: 14px;
  background: #fff;
  color: #23201e;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
:is(#ndvx, .ndvh) .ndvc-card:focus-visible {
  outline: 3px solid #3f6e56;
  outline-offset: 2px;
}
:is(#ndvx, .ndvh) .ndvc-img {
  display: block;
  flex: none;
  width: 104px;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  background: #f2f4f6;
}
:is(#ndvx, .ndvh) .ndvc-t {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
:is(#ndvx, .ndvh) .ndvc-d {
  display: block;
  flex: none;
  color: #5f6a78;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
:is(#ndvx, .ndvh) .ndvc-pc {
  display: none;
  position: relative;
  margin: 0;
}
:is(#ndvx, .ndvh) .ndvc-v {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 16px 16px 0 0;
  background: #111;
  cursor: pointer;
}
.ndvh-tall:is(#ndvx, .ndvh) .ndvc-v {
  width: auto;
  height: 420px;
  aspect-ratio: 9/16;
  margin: 0 auto;
}
/* 세로 영상(도움말)은 칸 폭 = 영상 폭(아래 한 줄도 같은 폭) */
.ndvh-tall:is(#ndvx, .ndvh) .ndvc-pc {
  width: fit-content;
  margin: 0 auto;
}
/* 보기 창(휴대폰) — body 바로 아래 */
.ndvd {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.88);
  padding: 56px 0 calc(16px + env(safe-area-inset-bottom));
}
.ndvd[hidden] {
  display: none;
}
.ndvd-box {
  width: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
}
.ndvd-v {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 88px);
  aspect-ratio: 16/9;
  background: #000;
}
.ndvd-tall .ndvd-v {
  width: auto;
  height: 90vh;
  height: min(90dvh, calc(100dvh - 88px));
  max-width: 100%;
  aspect-ratio: 9/16;
}
.ndvd-x {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: #191f28;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ndvd-x:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
/* PC · 넓은 화면: 쪽 제목 오른쪽 칸에 늘 펼침 · 켜진 칸(data-off 없음)이 있을 때만 그 칸을 담은 틀을 바꿈(꺼진 틀은 쪽 모양 그대로) */
@media (min-width: 1024px) {
  .ndvhost:is(#ndvx, .ndvhost):has(> .ndvh:not([data-off])) {
    display: flow-root;
  }
  .wrap.ndvhost:has(> .ndvh:not([data-off])) {
    max-width: var(--wrap, 1060px);
  }
  main.ndvmain:has(> .ndvh:not([data-off])) {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 24px;
  }
  body.wizon main.ndvmain > #wiz {
    display: flow-root;
  }
  .ndvh:is(#ndvx, .ndvh) {
    float: right;
    width: min(560px, 50%);
    margin: 0 0 24px 40px;
  }
  body:not(.wizon) main.ndvmain > .ndvh:is(#ndvx, .ndvh) {
    float: none;
    margin: 16px 0 16px auto;
  }
  :is(#ndvx, .ndvh) .ndvc-card {
    display: none;
  }
  :is(#ndvx, .ndvh) .ndvc-pc {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(#ndvx, .ndvh) .ndvc-v {
    cursor: auto;
  }
}
/* 641-3: 계산기 쪽은 칸이 <main> 바로 아래 — 휴대폰은 양옆 16px · 위 12px, PC 는 위 16px */
main.ndvmain > .ndvh:is(#ndvx, .ndvh) {
  margin: 12px 16px 4px;
}
@media (min-width: 1024px) {
  body.wizon main.ndvmain > .ndvh:is(#ndvx, .ndvh) {
    margin: 16px 0 24px 40px;
  }
}

/* 642-2 · 642-3 영상 아래 한 줄(nd-vidcard.js bar) — 메뉴 PC 영상 · 홈 영상 같은 모양
   [멈춤] [지난 / 전체] [진행 막대] [소리 켜기] [전체화면] · 누를 자리 44px · 어두운 바탕 흰 글(대비 15:1 넘음) · 영상 위에 얹지 않음 ·
   좁으면(칸 420px 이하) 진행 막대만 윗줄 · 아이디 무게(업종별 현황 #app 의 all: revert 보다 무겁게) */
.ndvbar:is(#ndvx, .ndvbar) {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 6px;
  border-radius: 0 0 16px 16px;
  background: #1b1f24;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}
.ndvbar:is(#ndvx, .ndvbar)[hidden] {
  display: none;
}
:is(#ndvx, .ndvbar) button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
:is(#ndvx, .ndvbar) .ndvb-pp,
:is(#ndvx, .ndvbar) .ndvb-fs {
  width: 44px;
  padding: 0;
}
:is(#ndvx, .ndvbar) .ndvb-snd {
  background: rgb(255 255 255 / 14%);
}
:is(#ndvx, .ndvbar) button:focus-visible,
:is(#ndvx, .ndvbar) .ndvb-seek:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}
:is(#ndvx, .ndvbar) svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
:is(#ndvx, .ndvbar) .ndvb-pp .hvp,
:is(#ndvx, .ndvbar) .ndvb-pp.on .hvg,
:is(#ndvx, .ndvbar) .ndvb-fs .fsout,
:is(#ndvx, .ndvbar) .ndvb-fs.on .fsin {
  display: none;
}
:is(#ndvx, .ndvbar) .ndvb-pp.on .hvp,
:is(#ndvx, .ndvbar) .ndvb-fs.on .fsout {
  display: inline;
}
:is(#ndvx, .ndvbar) .ndvb-t {
  flex: none;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
:is(#ndvx, .ndvbar) .ndvb-seek {
  flex: 1 1 80px;
  min-width: 60px;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  accent-color: #fff;
  cursor: pointer;
}
@container (max-width: 420px) {
  :is(#ndvx, .ndvbar) .ndvb-t {
    order: -2;
    padding-left: 8px;
  }
  :is(#ndvx, .ndvbar) .ndvb-seek {
    order: -1;
    flex: 1 1 calc(100% - 96px);
  }
  :is(#ndvx, .ndvbar) .ndvb-snd {
    margin-left: auto;
  }
}
